summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-05 21:28:04 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-05 21:28:04 +0000
commitb2f65314a8adcc1a8d496ecc43c1610108764e88 (patch)
tree1176eca3eb7a1325085dd2f494fc16e874540ad3
parent15be53e18478db7b243f7000ac759eb307ec6be1 (diff)
downloadchromium_src-b2f65314a8adcc1a8d496ecc43c1610108764e88.zip
chromium_src-b2f65314a8adcc1a8d496ecc43c1610108764e88.tar.gz
chromium_src-b2f65314a8adcc1a8d496ecc43c1610108764e88.tar.bz2
bring back deleted folder
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215691 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--third_party/gles2_book/Chapter_10/MultiTexture/MultiTexture.c213
-rw-r--r--third_party/gles2_book/Chapter_10/MultiTexture/basemap.tgabin0 -> 786476 bytes
-rw-r--r--third_party/gles2_book/Chapter_10/MultiTexture/lightmap.tgabin0 -> 196626 bytes
-rw-r--r--third_party/gles2_book/Chapter_10/RM_AlphaTest/RM_AlphaTest.rfx1050
-rw-r--r--third_party/gles2_book/Chapter_10/RM_AlphaTest/Torus.3dsbin0 -> 77621 bytes
-rw-r--r--third_party/gles2_book/Chapter_10/RM_AlphaTest/cloud.tgabin0 -> 262188 bytes
-rw-r--r--third_party/gles2_book/Chapter_10/RM_ClipPlane/RM_ClipPlane.rfx1020
-rw-r--r--third_party/gles2_book/Chapter_10/RM_ClipPlane/Sphere.3dsbin0 -> 23649 bytes
-rw-r--r--third_party/gles2_book/Chapter_10/RM_LinearFog/LinearFog.rfx1098
-rw-r--r--third_party/gles2_book/Chapter_10/RM_LinearFog/Terrain.3dsbin0 -> 1477635 bytes
-rw-r--r--third_party/gles2_book/Chapter_10/RM_LinearFog/Terrain.tgabin0 -> 786971 bytes
-rw-r--r--third_party/gles2_book/Chapter_11/Multisample/Multisample.c302
-rw-r--r--third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c243
-rw-r--r--third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.h45
-rw-r--r--third_party/gles2_book/Chapter_13/EnvironmentMapping/EnvironmentMapping.rfx1204
-rw-r--r--third_party/gles2_book/Chapter_13/EnvironmentMapping/Fieldstone.tgabin0 -> 786476 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/EnvironmentMapping/FieldstoneBumpDOT3.tgabin0 -> 786450 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/EnvironmentMapping/Snow.ddsbin0 -> 2097440 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/EnvironmentMapping/Sphere.3dsbin0 -> 23649 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/EnvironmentMapping/Teapot.3dsbin0 -> 1004218 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/Noise3D/Noise3D.rfx1171
-rw-r--r--third_party/gles2_book/Chapter_13/Noise3D/NoiseVolume.ddsbin0 -> 2097280 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/Noise3D/SkyDome.3dsbin0 -> 83982 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/Noise3D/Terrain.3dsbin0 -> 1477635 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/Noise3D/Terrain.tgabin0 -> 786971 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/Noise3D/generatenoise.c147
-rw-r--r--third_party/gles2_book/Chapter_13/ParticleSystem/ParticleSystem.c294
-rw-r--r--third_party/gles2_book/Chapter_13/ParticleSystem/smoke.tgabin0 -> 49170 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/PerFragmentLighting/Fieldstone.tgabin0 -> 786476 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/PerFragmentLighting/FieldstoneBumpDOT3.tgabin0 -> 786450 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/PerFragmentLighting/PerFragmentLighting.rfx1137
-rw-r--r--third_party/gles2_book/Chapter_13/PerFragmentLighting/Torus.3dsbin0 -> 77621 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/PostProcess/Car.3dsbin0 -> 71400 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/PostProcess/Cube.x215
-rw-r--r--third_party/gles2_book/Chapter_13/PostProcess/Fieldstone.tgabin0 -> 786476 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/PostProcess/PostProcess.rfx1395
-rw-r--r--third_party/gles2_book/Chapter_13/PostProcess/ScreenAlignedQuad.3dsbin0 -> 1504 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/ProceduralTextures/Checker.rfx1081
-rw-r--r--third_party/gles2_book/Chapter_13/ProceduralTextures/CheckerAA.rfx1109
-rw-r--r--third_party/gles2_book/Chapter_13/ProceduralTextures/ProceduralTextures.rfx1109
-rw-r--r--third_party/gles2_book/Chapter_13/ProceduralTextures/ScreenAlignedQuad.3dsbin0 -> 1504 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/ProceduralTextures/checker.fs21
-rw-r--r--third_party/gles2_book/Chapter_13/ProceduralTextures/checker.tiffbin0 -> 311274 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/ProceduralTextures/checker.vs14
-rw-r--r--third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Corona.tgabin0 -> 786971 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/ProjectiveSpotlight/ProjectiveSpotlight.rfx1133
-rw-r--r--third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Terrain.3dsbin0 -> 1477635 bytes
-rw-r--r--third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Terrain.tgabin0 -> 786971 bytes
-rw-r--r--third_party/gles2_book/Chapter_15/Hello_Triangle_KD/Hello_Triangle_KD.c306
-rw-r--r--third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.c104
-rw-r--r--third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.h38
-rw-r--r--third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.c150
-rw-r--r--third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.h53
-rw-r--r--third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.c321
-rw-r--r--third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.h52
-rw-r--r--third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.c176
-rw-r--r--third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.h49
-rw-r--r--third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.c203
-rw-r--r--third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.h49
-rw-r--r--third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.c229
-rw-r--r--third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.h52
-rw-r--r--third_party/gles2_book/Common/Include/esUtil.h178
-rw-r--r--third_party/gles2_book/Common/Source/esShader.c155
-rw-r--r--third_party/gles2_book/Common/Source/esShapes.c280
-rw-r--r--third_party/gles2_book/Common/Source/esTransform.c204
-rw-r--r--third_party/gles2_book/Common/Source/esUtil.c61
-rw-r--r--third_party/gles2_book/LICENSE7
-rw-r--r--third_party/gles2_book/README.TXT54
-rw-r--r--third_party/gles2_book/README.chromium47
-rw-r--r--third_party/gles2_book/gles2_book.gyp107
70 files changed, 16876 insertions, 0 deletions
diff --git a/third_party/gles2_book/Chapter_10/MultiTexture/MultiTexture.c b/third_party/gles2_book/Chapter_10/MultiTexture/MultiTexture.c
new file mode 100644
index 0000000..dc8c190
--- /dev/null
+++ b/third_party/gles2_book/Chapter_10/MultiTexture/MultiTexture.c
@@ -0,0 +1,213 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// MultiTexture.c
+//
+// This is an example that draws a quad with a basemap and
+// lightmap to demonstrate multitexturing.
+//
+#include <stdlib.h>
+#include "esUtil.h"
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+
+ // Attribute locations
+ GLint positionLoc;
+ GLint texCoordLoc;
+
+ // Sampler locations
+ GLint baseMapLoc;
+ GLint lightMapLoc;
+
+ // Texture handle
+ GLuint baseMapTexId;
+ GLuint lightMapTexId;
+
+} UserData;
+
+
+///
+// Load texture from disk
+//
+GLuint LoadTexture ( char *fileName )
+{
+ int width,
+ height;
+ char *buffer = esLoadTGA ( fileName, &width, &height );
+ GLuint texId;
+
+ if ( buffer == NULL )
+ {
+ esLogMessage ( "Error loading (%s) image.\n", fileName );
+ return 0;
+ }
+
+ glGenTextures ( 1, &texId );
+ glBindTexture ( GL_TEXTURE_2D, texId );
+
+ glTexImage2D ( GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, buffer );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
+
+ free ( buffer );
+
+ return texId;
+}
+
+
+
+///
+// Initialize the shader and program object
+//
+int Init ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+ GLbyte vShaderStr[] =
+ "attribute vec4 a_position; \n"
+ "attribute vec2 a_texCoord; \n"
+ "varying vec2 v_texCoord; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = a_position; \n"
+ " v_texCoord = a_texCoord; \n"
+ "} \n";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float; \n"
+ "varying vec2 v_texCoord; \n"
+ "uniform sampler2D s_baseMap; \n"
+ "uniform sampler2D s_lightMap; \n"
+ "void main() \n"
+ "{ \n"
+ " vec4 baseColor; \n"
+ " vec4 lightColor; \n"
+ " \n"
+ " baseColor = texture2D( s_baseMap, v_texCoord ); \n"
+ " lightColor = texture2D( s_lightMap, v_texCoord ); \n"
+ " gl_FragColor = baseColor * (lightColor + 0.25); \n"
+ "} \n";
+
+ // Load the shaders and get a linked program object
+ userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
+
+ // Get the attribute locations
+ userData->positionLoc = glGetAttribLocation ( userData->programObject, "a_position" );
+ userData->texCoordLoc = glGetAttribLocation ( userData->programObject, "a_texCoord" );
+
+ // Get the sampler location
+ userData->baseMapLoc = glGetUniformLocation ( userData->programObject, "s_baseMap" );
+ userData->lightMapLoc = glGetUniformLocation ( userData->programObject, "s_lightMap" );
+
+ // Load the textures
+ userData->baseMapTexId = LoadTexture ( "basemap.tga" );
+ userData->lightMapTexId = LoadTexture ( "lightmap.tga" );
+
+ if ( userData->baseMapTexId == 0 || userData->lightMapTexId == 0 )
+ return FALSE;
+
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+ return TRUE;
+}
+
+///
+// Draw a triangle using the shader pair created in Init()
+//
+void Draw ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+ GLfloat vVertices[] = { -0.5f, 0.5f, 0.0f, // Position 0
+ 0.0f, 0.0f, // TexCoord 0
+ -0.5f, -0.5f, 0.0f, // Position 1
+ 0.0f, 1.0f, // TexCoord 1
+ 0.5f, -0.5f, 0.0f, // Position 2
+ 1.0f, 1.0f, // TexCoord 2
+ 0.5f, 0.5f, 0.0f, // Position 3
+ 1.0f, 0.0f // TexCoord 3
+ };
+ GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+
+ // Set the viewport
+ glViewport ( 0, 0, esContext->width, esContext->height );
+
+ // Clear the color buffer
+ glClear ( GL_COLOR_BUFFER_BIT );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex position
+ glVertexAttribPointer ( userData->positionLoc, 3, GL_FLOAT,
+ GL_FALSE, 5 * sizeof(GLfloat), vVertices );
+ // Load the texture coordinate
+ glVertexAttribPointer ( userData->texCoordLoc, 2, GL_FLOAT,
+ GL_FALSE, 5 * sizeof(GLfloat), &vVertices[3] );
+
+ glEnableVertexAttribArray ( userData->positionLoc );
+ glEnableVertexAttribArray ( userData->texCoordLoc );
+
+ // Bind the base map
+ glActiveTexture ( GL_TEXTURE0 );
+ glBindTexture ( GL_TEXTURE_2D, userData->baseMapTexId );
+
+ // Set the base map sampler to texture unit to 0
+ glUniform1i ( userData->baseMapLoc, 0 );
+
+ // Bind the light map
+ glActiveTexture ( GL_TEXTURE1 );
+ glBindTexture ( GL_TEXTURE_2D, userData->lightMapTexId );
+
+ // Set the light map sampler to texture unit 1
+ glUniform1i ( userData->lightMapLoc, 1 );
+
+ glDrawElements ( GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices );
+
+ eglSwapBuffers ( esContext->eglDisplay, esContext->eglSurface );
+}
+
+///
+// Cleanup
+//
+void ShutDown ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+
+ // Delete texture object
+ glDeleteTextures ( 1, &userData->baseMapTexId );
+ glDeleteTextures ( 1, &userData->lightMapTexId );
+
+ // Delete program object
+ glDeleteProgram ( userData->programObject );
+}
+
+
+int main ( int argc, char *argv[] )
+{
+ ESContext esContext;
+ UserData userData;
+
+ esInitContext ( &esContext );
+ esContext.userData = &userData;
+
+ esCreateWindow ( &esContext, "MultiTexture", 320, 240, ES_WINDOW_RGB );
+
+ if ( !Init ( &esContext ) )
+ return 0;
+
+ esRegisterDrawFunc ( &esContext, Draw );
+
+ esMainLoop ( &esContext );
+
+ ShutDown ( &esContext );
+}
diff --git a/third_party/gles2_book/Chapter_10/MultiTexture/basemap.tga b/third_party/gles2_book/Chapter_10/MultiTexture/basemap.tga
new file mode 100644
index 0000000..8acafae
--- /dev/null
+++ b/third_party/gles2_book/Chapter_10/MultiTexture/basemap.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_10/MultiTexture/lightmap.tga b/third_party/gles2_book/Chapter_10/MultiTexture/lightmap.tga
new file mode 100644
index 0000000..d95b262
--- /dev/null
+++ b/third_party/gles2_book/Chapter_10/MultiTexture/lightmap.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_10/RM_AlphaTest/RM_AlphaTest.rfx b/third_party/gles2_book/Chapter_10/RM_AlphaTest/RM_AlphaTest.rfx
new file mode 100644
index 0000000..4cb98eb
--- /dev/null
+++ b/third_party/gles2_book/Chapter_10/RM_AlphaTest/RM_AlphaTest.rfx
@@ -0,0 +1,1050 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE RENDER_MONKEY [
+ <!ELEMENT RENDER_MONKEY
+ (
+ RmEffectWorkspace |
+ RmRegistryBranch |
+ RmClipboardNode
+ )?>
+
+ <!ELEMENT RmEffectWorkspace
+ (
+ RmRegistryBranch?,
+ RmPlugInData?,
+ RmStringVariable*,
+ (
+ ( RmDirectXEffect, RmOpenGLEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLEffect, RmDirectXEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLESEffect, RmDirectXEffect?, RmOpenGLEffect? )
+ )?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmEffectGroup
+ )*
+ )>
+
+ <!ELEMENT RmEffectGroup
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData
+ )*
+ )>
+
+ <!ELEMENT RmDirectXEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLESEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLESPass
+ )*
+ )>
+
+ <!ELEMENT RmPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ (
+ ( RmHLSLShader | RmShader ),
+ ( RmShader | RmHLSLShader )?
+ )
+ )?,
+ RmRenderTarget*,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject
+ )*
+ )>
+
+ <!ELEMENT RmGLPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLShader, RmGLShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLESPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLESShader, RmGLESShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant
+ )*
+ )>
+
+ <!ELEMENT RmHLSLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmGLESShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmTextureObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmTextureReference?,
+ RmState*
+ )>
+
+ <!ELEMENT RmLightObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmLightReference?
+ )>
+
+ <!ELEMENT RmMaterialObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmMaterialReference?
+ )>
+
+ <!ELEMENT RmRenderStateBlock
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmState
+ )*
+ )>
+
+ <!ELEMENT RmStreamMap
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmStream
+ )*
+ )>
+
+ <!ELEMENT RmStream ( RmPlugInData?, RmStreamChannel* )>
+
+ <!ELEMENT RmModelData ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmTextureReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmLightReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmMaterialReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmCameraReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmModelReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmStreamMapReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderableTexture ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderTarget ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmBooleanVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmFloatVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmVectorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMatrixVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmColorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmIntegerVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm2DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCubemapVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm3DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmLightVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMaterialVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCamera ( RmPlugInData?, RmStringVariable* )>
+
+ <!ELEMENT RmStringVariable ( RmTextDataBlock, RmPlugInData? )>
+
+ <!ELEMENT RmDynamicVariable
+ (
+ RmDynamicVariableValueContainer,
+ RmPlugInData?,
+ RmStringVariable?
+ )>
+
+ <!ELEMENT RmDynamicVariableValueContainer
+ (
+ RmPlugInData?,
+ RmDynamicVariableValue*
+ )>
+
+ <!ELEMENT RmTextDataBlock ( #PCDATA ) >
+
+ <!ELEMENT RmRegistryBranch
+ (
+ RmTextDataBlock?,
+ (
+ RmRegistryBranch |
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable
+ )*
+ )>
+
+ <!ELEMENT RmPlugInData
+ (
+ RmTextDataBlock?,
+ (
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable
+ )*
+ )>
+
+ <!ELEMENT RmClipboardNode
+ (
+ RmTextDataBlock?,
+ (
+ RmEffectWorkspace |
+ RmEffectGroup |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmPass |
+ RmGLPass |
+ RmGLESPass |
+ RmShader |
+ RmHLSLShader |
+ RmGLShader |
+ RmGLESShader |
+ RmShaderConstant |
+ RmSampler |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmRenderStateBlock |
+ RmState |
+ RmStreamMap |
+ RmStream |
+ RmStreamChannel |
+ RmModelData |
+ RmTextureReference |
+ RmLightReference |
+ RmMaterialReference |
+ RmModelReference |
+ RmStreamMapReference |
+ RmRenderableTexture |
+ RmRenderTarget |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmDynamicVariableValue |
+ RmColorVariable |
+ RmIntegerVariable |
+ RmStringVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRegistryBranch |
+ RmPlugInData |
+ RmCamera |
+ RmCameraReference
+ )*
+ )>
+
+ <!ELEMENT RmStreamChannel ( RmPlugInData? ) >
+ <!ELEMENT RmShaderConstant ( RmPlugInData? ) >
+ <!ELEMENT RmSampler ( RmPlugInData? ) >
+ <!ELEMENT RmState ( RmPlugInData? ) >
+ <!ELEMENT RmDynamicVariableValue ( RmPlugInData? ) >
+
+ <!ELEMENT RmShaderCode ( #PCDATA ) >
+
+ <!ATTLIST RmEffectWorkspace
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_EFFECT CDATA #REQUIRED
+ VALIDATION_STRING CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmEffectGroup
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDirectXEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLESEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmHLSLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ TARGET CDATA #REQUIRED
+ ENTRY_POINT CDATA #REQUIRED
+ COMPILER_FLAGS CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmGLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderConstant
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmSampler
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE_INDEX CDATA #REQUIRED
+ VERTEX_TEXTURE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmLightObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderStateBlock
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmState
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMap
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStream
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STRIDE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamChannel
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ DATA_SIZE CDATA #REQUIRED
+ DATA_TYPE CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ USAGE_INDEX CDATA #REQUIRED
+ ATTRIBUTE_NAME CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIENTATION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMapReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderableTexture
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ WIDTH CDATA #REQUIRED
+ HEIGHT CDATA #REQUIRED
+ FORMAT CDATA #REQUIRED
+ USE_VIEWPORT_DIMENSIONS ( TRUE | FALSE ) #REQUIRED
+ GENERATE_MIPMAPS ( TRUE | FALSE ) #REQUIRED
+ WIDTH_RATIO CDATA #REQUIRED
+ HEIGHT_RATIO CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderTarget
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ RENDER_TO_SCREEN ( TRUE | FALSE ) #REQUIRED
+ COLOR_CLEAR ( TRUE | FALSE ) #REQUIRED
+ DEPTH_CLEAR ( TRUE | FALSE ) #REQUIRED
+ CLEAR_COLOR_VALUE CDATA #REQUIRED
+ DEPTH_CLEAR_VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmBooleanVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmFloatVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmVectorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmMatrixVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ VALUE_4 CDATA #REQUIRED
+ VALUE_5 CDATA #REQUIRED
+ VALUE_6 CDATA #REQUIRED
+ VALUE_7 CDATA #REQUIRED
+ VALUE_8 CDATA #REQUIRED
+ VALUE_9 CDATA #REQUIRED
+ VALUE_10 CDATA #REQUIRED
+ VALUE_11 CDATA #REQUIRED
+ VALUE_12 CDATA #REQUIRED
+ VALUE_13 CDATA #REQUIRED
+ VALUE_14 CDATA #REQUIRED
+ VALUE_15 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VARIABLE_TYPE ( FLOAT | INTEGER | BOOLEAN ) #REQUIRED
+ ROWS CDATA #REQUIRED
+ COLUMNS CDATA #REQUIRED
+ FIXED_SIZE ( TRUE | FALSE ) #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariableValue
+ ROW_INDEX CDATA #REQUIRED
+ COLUMN_INDEX CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmColorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmIntegerVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmStringVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm2DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCubemapVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm3DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ LIGHT_ENABLED ( TRUE | FALSE ) #REQUIRED
+ LIGHT_TYPE ( POSITIONAL | DIRECTIONAL | SPOTLIGHT ) #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ POSITION_0 CDATA #REQUIRED
+ POSITION_1 CDATA #REQUIRED
+ POSITION_2 CDATA #REQUIRED
+ DIRECTION_0 CDATA #REQUIRED
+ DIRECTION_1 CDATA #REQUIRED
+ DIRECTION_2 CDATA #REQUIRED
+ ATTENUATION_0 CDATA #REQUIRED
+ ATTENUATION_1 CDATA #REQUIRED
+ ATTENUATION_2 CDATA #REQUIRED
+ SPOTLIGHT_THETA CDATA #REQUIRED
+ SPOTLIGHT_PHI CDATA #REQUIRED
+ RANGE CDATA #REQUIRED
+ FALLOFF CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ EMISSIVE_0 CDATA #REQUIRED
+ EMISSIVE_1 CDATA #REQUIRED
+ EMISSIVE_2 CDATA #REQUIRED
+ EMISSIVE_3 CDATA #REQUIRED
+ SPECULAR_POWER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRegistryBranch
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPlugInData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PLUGIN_GUID CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmClipboardNode
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCamera
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ CAMERA_POSITION_X CDATA #REQUIRED
+ CAMERA_POSITION_Y CDATA #REQUIRED
+ CAMERA_POSITION_Z CDATA #REQUIRED
+ LOOK_AT_VECTOR_X CDATA #REQUIRED
+ LOOK_AT_VECTOR_Y CDATA #REQUIRED
+ LOOK_AT_VECTOR_Z CDATA #REQUIRED
+ UP_VECTOR_X CDATA #REQUIRED
+ UP_VECTOR_Y CDATA #REQUIRED
+ UP_VECTOR_Z CDATA #REQUIRED
+ FOV CDATA #REQUIRED
+ NEAR_CLIP_PLANE CDATA #REQUIRED
+ FAR_CLIP_PLANE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCameraReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ USE_ACTIVE_CAMERA ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderCode
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+ <!ATTLIST RmTextDataBlock
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+]>
+<RENDER_MONKEY>
+ <RmEffectWorkspace NAME="Effect Workspace" API="" ACTIVE_EFFECT="Effect Workspace.Textured" VALIDATION_STRING="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_REGISTRY" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_LOCAL" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_PLUGIN" API="" XML_VERSION="RenderMonkey 1.71"><RmTextDataBlock TYPE="TEXT"><![CDATA[
+<DockingPaneLayouts><Application_Layout><Pane-1><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Artist Editor</Title><ID>1001</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>7</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>7</LastHolder></Pane-1><Pane-2><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>0</Horiz><Pane-1>3</Pane-1><Pane-2>8</Pane-2><Panes>2</Panes></Pane-2><Pane-3><Type>2</Type><DockingCX>0</DockingCX><DockingCY>641</DockingCY><Horiz>1</Horiz><Pane-1>4</Pane-1><Pane-2>6</Pane-2><Pane-3>7</Pane-3><Panes>3</Panes></Pane-3><Pane-4><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>5</Selected><Panes>1</Panes><Pane-1>5</Pane-1></Pane-4><Pane-5><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Workspace</Title><ID>1000</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>4</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>4</LastHolder></Pane-5><Pane-6><Type>4</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY></Pane-6><Pane-7><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-7><Pane-8><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>9</Selected><Panes>1</Panes><Pane-1>9</Pane-1></Pane-8><Pane-9><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Output</Title><ID>1002</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>8</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>8</LastHolder></Pane-9><Summary><TopContainer>2</TopContainer><Client>6</Client><Panes>9</Panes></Summary></Application_Layout></DockingPaneLayouts>
+]]></RmTextDataBlock>
+ <RmRegistryBranch NAME="RmPreviewDx9Window" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLESWindow" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLWindow" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EffectPlacementRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewGLPreview" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmLightEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NoteEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderableTextureEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderTargetEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmShaderEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Fragment Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Pass 0]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderStateBlockEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="108" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="140" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1283" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="434" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureGenerator" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmStreamEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured.Stream Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="258" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="128" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="851" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="270" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+25/11/2007 13:42:35]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey Version 1.80 (build 125)]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="XML_VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey 1.71]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="BASE_WORKSPACE_PATH" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+D:\download\]]></RmTextDataBlock></RmStringVariable>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmOpenGLESEffect NAME="Textured" API="OpenGL ES" ACTIVE_CAMERA="">
+ <RmMatrixVariable NAME="matViewProjection" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="0.101415" VALUE_1="-1.953759" VALUE_2="0.974475" VALUE_3="6.940574" VALUE_4="-1.739748" VALUE_5="0.673897" VALUE_6="1.532177" VALUE_7="11.274156" VALUE_8="0.729371" VALUE_9="0.369806" VALUE_10="0.665530" VALUE_11="130.011505" VALUE_12="0.691769" VALUE_13="0.350741" VALUE_14="0.631219" VALUE_15="188.355209"/>
+ <Rm2DTextureVariable NAME="base" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" FILE_NAME="cloud.tga" ORIGIN="0"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="20">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="rm_Vertex"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="rm_TexCoord0"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="Model" API="" FILE_NAME=".\Torus.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Pass 0" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmModelReference NAME="Model" API=""/>
+ <RmRenderStateBlock NAME="Render State" API="OpenGL ES">
+ <RmState NAME="GL_CullMode" API="OpenGL ES" STATE="8" VALUE="1" USAGE="RENDER_STATE"/>
+ </RmRenderStateBlock>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+
+uniform sampler2D baseMap;
+
+varying vec2 v_texCoord;
+
+void main( void )
+{
+ vec4 baseColor = texture2D( baseMap, v_texCoord );
+
+ if( baseColor.a < 0.25 )
+ {
+ discard;
+ }
+ else
+ {
+ gl_FragColor = baseColor;
+ }
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform mat4 matViewProjection;
+attribute vec4 rm_Vertex;
+attribute vec2 rm_TexCoord0;
+varying vec2 v_texCoord;
+
+void main( void )
+{
+ gl_Position = matViewProjection * rm_Vertex;
+ v_texCoord = rm_TexCoord0.xy;
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="baseMap" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="base" API=""/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="6" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmSampler NAME="baseMap" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="matViewProjection" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ </RmEffectWorkspace>
+</RENDER_MONKEY>
diff --git a/third_party/gles2_book/Chapter_10/RM_AlphaTest/Torus.3ds b/third_party/gles2_book/Chapter_10/RM_AlphaTest/Torus.3ds
new file mode 100644
index 0000000..cceac9aa
--- /dev/null
+++ b/third_party/gles2_book/Chapter_10/RM_AlphaTest/Torus.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_10/RM_AlphaTest/cloud.tga b/third_party/gles2_book/Chapter_10/RM_AlphaTest/cloud.tga
new file mode 100644
index 0000000..74ddd8f
--- /dev/null
+++ b/third_party/gles2_book/Chapter_10/RM_AlphaTest/cloud.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_10/RM_ClipPlane/RM_ClipPlane.rfx b/third_party/gles2_book/Chapter_10/RM_ClipPlane/RM_ClipPlane.rfx
new file mode 100644
index 0000000..73bb7a8
--- /dev/null
+++ b/third_party/gles2_book/Chapter_10/RM_ClipPlane/RM_ClipPlane.rfx
@@ -0,0 +1,1020 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE RENDER_MONKEY [
+ <!ELEMENT RENDER_MONKEY
+ (
+ RmEffectWorkspace |
+ RmRegistryBranch |
+ RmClipboardNode
+ )?>
+
+ <!ELEMENT RmEffectWorkspace
+ (
+ RmRegistryBranch?,
+ RmPlugInData?,
+ RmStringVariable*,
+ (
+ ( RmDirectXEffect, RmOpenGLEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLEffect, RmDirectXEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLESEffect, RmDirectXEffect?, RmOpenGLEffect? )
+ )?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmEffectGroup
+ )*
+ )>
+
+ <!ELEMENT RmEffectGroup
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData
+ )*
+ )>
+
+ <!ELEMENT RmDirectXEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLESEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLESPass
+ )*
+ )>
+
+ <!ELEMENT RmPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ (
+ ( RmHLSLShader | RmShader ),
+ ( RmShader | RmHLSLShader )?
+ )
+ )?,
+ RmRenderTarget*,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject
+ )*
+ )>
+
+ <!ELEMENT RmGLPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLShader, RmGLShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLESPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLESShader, RmGLESShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant
+ )*
+ )>
+
+ <!ELEMENT RmHLSLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmGLESShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmTextureObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmTextureReference?,
+ RmState*
+ )>
+
+ <!ELEMENT RmLightObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmLightReference?
+ )>
+
+ <!ELEMENT RmMaterialObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmMaterialReference?
+ )>
+
+ <!ELEMENT RmRenderStateBlock
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmState
+ )*
+ )>
+
+ <!ELEMENT RmStreamMap
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmStream
+ )*
+ )>
+
+ <!ELEMENT RmStream ( RmPlugInData?, RmStreamChannel* )>
+
+ <!ELEMENT RmModelData ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmTextureReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmLightReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmMaterialReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmCameraReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmModelReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmStreamMapReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderableTexture ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderTarget ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmBooleanVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmFloatVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmVectorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMatrixVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmColorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmIntegerVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm2DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCubemapVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm3DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmLightVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMaterialVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCamera ( RmPlugInData?, RmStringVariable* )>
+
+ <!ELEMENT RmStringVariable ( RmTextDataBlock, RmPlugInData? )>
+
+ <!ELEMENT RmDynamicVariable
+ (
+ RmDynamicVariableValueContainer,
+ RmPlugInData?,
+ RmStringVariable?
+ )>
+
+ <!ELEMENT RmDynamicVariableValueContainer
+ (
+ RmPlugInData?,
+ RmDynamicVariableValue*
+ )>
+
+ <!ELEMENT RmTextDataBlock ( #PCDATA ) >
+
+ <!ELEMENT RmRegistryBranch
+ (
+ RmTextDataBlock?,
+ (
+ RmRegistryBranch |
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable
+ )*
+ )>
+
+ <!ELEMENT RmPlugInData
+ (
+ RmTextDataBlock?,
+ (
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable
+ )*
+ )>
+
+ <!ELEMENT RmClipboardNode
+ (
+ RmTextDataBlock?,
+ (
+ RmEffectWorkspace |
+ RmEffectGroup |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmPass |
+ RmGLPass |
+ RmGLESPass |
+ RmShader |
+ RmHLSLShader |
+ RmGLShader |
+ RmGLESShader |
+ RmShaderConstant |
+ RmSampler |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmRenderStateBlock |
+ RmState |
+ RmStreamMap |
+ RmStream |
+ RmStreamChannel |
+ RmModelData |
+ RmTextureReference |
+ RmLightReference |
+ RmMaterialReference |
+ RmModelReference |
+ RmStreamMapReference |
+ RmRenderableTexture |
+ RmRenderTarget |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmDynamicVariableValue |
+ RmColorVariable |
+ RmIntegerVariable |
+ RmStringVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRegistryBranch |
+ RmPlugInData |
+ RmCamera |
+ RmCameraReference
+ )*
+ )>
+
+ <!ELEMENT RmStreamChannel ( RmPlugInData? ) >
+ <!ELEMENT RmShaderConstant ( RmPlugInData? ) >
+ <!ELEMENT RmSampler ( RmPlugInData? ) >
+ <!ELEMENT RmState ( RmPlugInData? ) >
+ <!ELEMENT RmDynamicVariableValue ( RmPlugInData? ) >
+
+ <!ELEMENT RmShaderCode ( #PCDATA ) >
+
+ <!ATTLIST RmEffectWorkspace
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_EFFECT CDATA #REQUIRED
+ VALIDATION_STRING CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmEffectGroup
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDirectXEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLESEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmHLSLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ TARGET CDATA #REQUIRED
+ ENTRY_POINT CDATA #REQUIRED
+ COMPILER_FLAGS CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmGLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderConstant
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmSampler
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE_INDEX CDATA #REQUIRED
+ VERTEX_TEXTURE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmLightObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderStateBlock
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmState
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMap
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStream
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STRIDE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamChannel
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ DATA_SIZE CDATA #REQUIRED
+ DATA_TYPE CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ USAGE_INDEX CDATA #REQUIRED
+ ATTRIBUTE_NAME CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIENTATION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMapReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderableTexture
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ WIDTH CDATA #REQUIRED
+ HEIGHT CDATA #REQUIRED
+ FORMAT CDATA #REQUIRED
+ USE_VIEWPORT_DIMENSIONS ( TRUE | FALSE ) #REQUIRED
+ GENERATE_MIPMAPS ( TRUE | FALSE ) #REQUIRED
+ WIDTH_RATIO CDATA #REQUIRED
+ HEIGHT_RATIO CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderTarget
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ RENDER_TO_SCREEN ( TRUE | FALSE ) #REQUIRED
+ COLOR_CLEAR ( TRUE | FALSE ) #REQUIRED
+ DEPTH_CLEAR ( TRUE | FALSE ) #REQUIRED
+ CLEAR_COLOR_VALUE CDATA #REQUIRED
+ DEPTH_CLEAR_VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmBooleanVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmFloatVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmVectorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmMatrixVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ VALUE_4 CDATA #REQUIRED
+ VALUE_5 CDATA #REQUIRED
+ VALUE_6 CDATA #REQUIRED
+ VALUE_7 CDATA #REQUIRED
+ VALUE_8 CDATA #REQUIRED
+ VALUE_9 CDATA #REQUIRED
+ VALUE_10 CDATA #REQUIRED
+ VALUE_11 CDATA #REQUIRED
+ VALUE_12 CDATA #REQUIRED
+ VALUE_13 CDATA #REQUIRED
+ VALUE_14 CDATA #REQUIRED
+ VALUE_15 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VARIABLE_TYPE ( FLOAT | INTEGER | BOOLEAN ) #REQUIRED
+ ROWS CDATA #REQUIRED
+ COLUMNS CDATA #REQUIRED
+ FIXED_SIZE ( TRUE | FALSE ) #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariableValue
+ ROW_INDEX CDATA #REQUIRED
+ COLUMN_INDEX CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmColorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmIntegerVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmStringVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm2DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCubemapVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm3DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ LIGHT_ENABLED ( TRUE | FALSE ) #REQUIRED
+ LIGHT_TYPE ( POSITIONAL | DIRECTIONAL | SPOTLIGHT ) #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ POSITION_0 CDATA #REQUIRED
+ POSITION_1 CDATA #REQUIRED
+ POSITION_2 CDATA #REQUIRED
+ DIRECTION_0 CDATA #REQUIRED
+ DIRECTION_1 CDATA #REQUIRED
+ DIRECTION_2 CDATA #REQUIRED
+ ATTENUATION_0 CDATA #REQUIRED
+ ATTENUATION_1 CDATA #REQUIRED
+ ATTENUATION_2 CDATA #REQUIRED
+ SPOTLIGHT_THETA CDATA #REQUIRED
+ SPOTLIGHT_PHI CDATA #REQUIRED
+ RANGE CDATA #REQUIRED
+ FALLOFF CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ EMISSIVE_0 CDATA #REQUIRED
+ EMISSIVE_1 CDATA #REQUIRED
+ EMISSIVE_2 CDATA #REQUIRED
+ EMISSIVE_3 CDATA #REQUIRED
+ SPECULAR_POWER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRegistryBranch
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPlugInData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PLUGIN_GUID CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmClipboardNode
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCamera
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ CAMERA_POSITION_X CDATA #REQUIRED
+ CAMERA_POSITION_Y CDATA #REQUIRED
+ CAMERA_POSITION_Z CDATA #REQUIRED
+ LOOK_AT_VECTOR_X CDATA #REQUIRED
+ LOOK_AT_VECTOR_Y CDATA #REQUIRED
+ LOOK_AT_VECTOR_Z CDATA #REQUIRED
+ UP_VECTOR_X CDATA #REQUIRED
+ UP_VECTOR_Y CDATA #REQUIRED
+ UP_VECTOR_Z CDATA #REQUIRED
+ FOV CDATA #REQUIRED
+ NEAR_CLIP_PLANE CDATA #REQUIRED
+ FAR_CLIP_PLANE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCameraReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ USE_ACTIVE_CAMERA ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderCode
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+ <!ATTLIST RmTextDataBlock
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+]>
+<RENDER_MONKEY>
+ <RmEffectWorkspace NAME="Effect Workspace" API="" ACTIVE_EFFECT="Effect Workspace.Textured" VALIDATION_STRING="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_REGISTRY" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_LOCAL" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_PLUGIN" API="" XML_VERSION="RenderMonkey 1.71"><RmTextDataBlock TYPE="TEXT"><![CDATA[
+<DockingPaneLayouts><Application_Layout><Pane-1><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Artist Editor</Title><ID>1001</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>9</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>9</LastHolder></Pane-1><Pane-2><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>1</Horiz><Pane-1>3</Pane-1><Pane-2>4</Pane-2><Panes>2</Panes></Pane-2><Pane-3><Type>1</Type><DockingCX>496</DockingCX><DockingCY>230</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-3><Pane-4><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>0</Horiz><Pane-1>5</Pane-1><Pane-2>10</Pane-2><Panes>2</Panes></Pane-4><Pane-5><Type>2</Type><DockingCX>0</DockingCX><DockingCY>641</DockingCY><Horiz>1</Horiz><Pane-1>6</Pane-1><Pane-2>8</Pane-2><Pane-3>9</Pane-3><Panes>3</Panes></Pane-5><Pane-6><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>7</Selected><Panes>1</Panes><Pane-1>7</Pane-1></Pane-6><Pane-7><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Workspace</Title><ID>1000</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>6</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>6</LastHolder></Pane-7><Pane-8><Type>4</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY></Pane-8><Pane-9><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-9><Pane-10><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>11</Selected><Panes>1</Panes><Pane-1>11</Pane-1></Pane-10><Pane-11><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Output</Title><ID>1002</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>10</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>10</LastHolder></Pane-11><Pane-12><Type>0</Type><DockingCX>496</DockingCX><DockingCY>230</DockingCY><Title>u_clipPlane</Title><ID>1100</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>3</DockingHolder><FloatingHolder>15</FloatingHolder><LastHolder>15</LastHolder></Pane-12><Pane-13><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>14</TopContaner><WindowRectTopPos>431</WindowRectTopPos><WindowRectBottomPos>661</WindowRectBottomPos><WindowRectLeftPos>343</WindowRectLeftPos><WindowRectRightPos>839</WindowRectRightPos></Pane-13><Pane-14><Type>2</Type><DockingCX>496</DockingCX><DockingCY>230</DockingCY><Horiz>1</Horiz><Pane-1>15</Pane-1><Panes>1</Panes></Pane-14><Pane-15><Type>1</Type><DockingCX>496</DockingCX><DockingCY>230</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-15><Summary><TopContainer>2</TopContainer><Client>8</Client><Panes>15</Panes></Summary></Application_Layout></DockingPaneLayouts>
+]]></RmTextDataBlock>
+ <RmRegistryBranch NAME="RmVectorEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured.u_clipPlane" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1100" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewDx9Window" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLESWindow" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLWindow" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EffectPlacementRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewGLPreview" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmLightEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NoteEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderableTextureEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderTargetEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmShaderEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Fragment Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Pass 0]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="15" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="459" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderStateBlockEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureGenerator" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+25/11/2007 14:33:23]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey Version 1.80 (build 125)]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="XML_VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey 1.71]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="BASE_WORKSPACE_PATH" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+d:\download\]]></RmTextDataBlock></RmStringVariable>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmOpenGLESEffect NAME="Textured" API="OpenGL ES" ACTIVE_CAMERA="">
+ <RmMatrixVariable NAME="matViewProjection" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="2.127030" VALUE_1="0.488594" VALUE_2="0.118666" VALUE_3="-0.000001" VALUE_4="-0.502655" VALUE_5="2.308663" VALUE_6="-0.495822" VALUE_7="-0.000006" VALUE_8="0.097929" VALUE_9="-0.188753" VALUE_10="-0.978154" VALUE_11="199.199097" VALUE_12="0.097831" VALUE_13="-0.188564" VALUE_14="-0.977176" VALUE_15="199.999893"/>
+ <RmVectorVariable NAME="u_clipPlane" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE_0="0.436597" VALUE_1="0.899658" VALUE_2="0.000000" VALUE_3="1.000000" MIN="-10.000000" MAX="10.000000" CLAMP="FALSE" NORMALIZE="TRUE"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="20">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="rm_Vertex"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="rm_TexCoord0"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="Model" API="" FILE_NAME=".\Sphere.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Pass 0" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmModelReference NAME="Model" API=""/>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform vec4 u_clipPlane;
+uniform mat4 matViewProjection;
+attribute vec4 rm_Vertex;
+
+varying float u_clipDist;
+
+void main( void )
+{
+ // Compute the distance between the vertex and
+ // the clip plane
+ u_clipDist = dot( rm_Vertex.xyz, u_clipPlane.xyz ) +
+ u_clipPlane.w;
+ gl_Position = matViewProjection * rm_Vertex;
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+varying float u_clipDist;
+void main( void )
+{
+ // Reject fragments behind the clip plane
+ if( u_clipDist < 0.0 )
+ discard;
+
+ gl_FragColor = vec4( 0.5, 0.5, 1.0, 0.0 );
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmShaderConstant NAME="matViewProjection" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_clipPlane" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ </RmEffectWorkspace>
+</RENDER_MONKEY>
diff --git a/third_party/gles2_book/Chapter_10/RM_ClipPlane/Sphere.3ds b/third_party/gles2_book/Chapter_10/RM_ClipPlane/Sphere.3ds
new file mode 100644
index 0000000..108b93d
--- /dev/null
+++ b/third_party/gles2_book/Chapter_10/RM_ClipPlane/Sphere.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_10/RM_LinearFog/LinearFog.rfx b/third_party/gles2_book/Chapter_10/RM_LinearFog/LinearFog.rfx
new file mode 100644
index 0000000..f7cd646
--- /dev/null
+++ b/third_party/gles2_book/Chapter_10/RM_LinearFog/LinearFog.rfx
@@ -0,0 +1,1098 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE RENDER_MONKEY [
+ <!ELEMENT RENDER_MONKEY
+ (
+ RmEffectWorkspace |
+ RmRegistryBranch |
+ RmClipboardNode
+ )?>
+
+ <!ELEMENT RmEffectWorkspace
+ (
+ RmRegistryBranch?,
+ RmPlugInData?,
+ RmStringVariable*,
+ (
+ ( RmDirectXEffect, RmOpenGLEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLEffect, RmDirectXEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLESEffect, RmDirectXEffect?, RmOpenGLEffect? )
+ )?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmEffectGroup
+ )*
+ )>
+
+ <!ELEMENT RmEffectGroup
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData
+ )*
+ )>
+
+ <!ELEMENT RmDirectXEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLESEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLESPass
+ )*
+ )>
+
+ <!ELEMENT RmPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ (
+ ( RmHLSLShader | RmShader ),
+ ( RmShader | RmHLSLShader )?
+ )
+ )?,
+ RmRenderTarget*,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject
+ )*
+ )>
+
+ <!ELEMENT RmGLPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLShader, RmGLShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLESPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLESShader, RmGLESShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant
+ )*
+ )>
+
+ <!ELEMENT RmHLSLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmGLESShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmTextureObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmTextureReference?,
+ RmState*
+ )>
+
+ <!ELEMENT RmLightObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmLightReference?
+ )>
+
+ <!ELEMENT RmMaterialObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmMaterialReference?
+ )>
+
+ <!ELEMENT RmRenderStateBlock
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmState
+ )*
+ )>
+
+ <!ELEMENT RmStreamMap
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmStream
+ )*
+ )>
+
+ <!ELEMENT RmStream ( RmPlugInData?, RmStreamChannel* )>
+
+ <!ELEMENT RmModelData ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmTextureReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmLightReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmMaterialReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmCameraReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmModelReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmStreamMapReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderableTexture ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderTarget ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmBooleanVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmFloatVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmVectorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMatrixVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmColorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmIntegerVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm2DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCubemapVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm3DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmLightVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMaterialVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCamera ( RmPlugInData?, RmStringVariable* )>
+
+ <!ELEMENT RmStringVariable ( RmTextDataBlock, RmPlugInData? )>
+
+ <!ELEMENT RmDynamicVariable
+ (
+ RmDynamicVariableValueContainer,
+ RmPlugInData?,
+ RmStringVariable?
+ )>
+
+ <!ELEMENT RmDynamicVariableValueContainer
+ (
+ RmPlugInData?,
+ RmDynamicVariableValue*
+ )>
+
+ <!ELEMENT RmTextDataBlock ( #PCDATA ) >
+
+ <!ELEMENT RmRegistryBranch
+ (
+ RmTextDataBlock?,
+ (
+ RmRegistryBranch |
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable
+ )*
+ )>
+
+ <!ELEMENT RmPlugInData
+ (
+ RmTextDataBlock?,
+ (
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable
+ )*
+ )>
+
+ <!ELEMENT RmClipboardNode
+ (
+ RmTextDataBlock?,
+ (
+ RmEffectWorkspace |
+ RmEffectGroup |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmPass |
+ RmGLPass |
+ RmGLESPass |
+ RmShader |
+ RmHLSLShader |
+ RmGLShader |
+ RmGLESShader |
+ RmShaderConstant |
+ RmSampler |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmRenderStateBlock |
+ RmState |
+ RmStreamMap |
+ RmStream |
+ RmStreamChannel |
+ RmModelData |
+ RmTextureReference |
+ RmLightReference |
+ RmMaterialReference |
+ RmModelReference |
+ RmStreamMapReference |
+ RmRenderableTexture |
+ RmRenderTarget |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmDynamicVariableValue |
+ RmColorVariable |
+ RmIntegerVariable |
+ RmStringVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRegistryBranch |
+ RmPlugInData |
+ RmCamera |
+ RmCameraReference
+ )*
+ )>
+
+ <!ELEMENT RmStreamChannel ( RmPlugInData? ) >
+ <!ELEMENT RmShaderConstant ( RmPlugInData? ) >
+ <!ELEMENT RmSampler ( RmPlugInData? ) >
+ <!ELEMENT RmState ( RmPlugInData? ) >
+ <!ELEMENT RmDynamicVariableValue ( RmPlugInData? ) >
+
+ <!ELEMENT RmShaderCode ( #PCDATA ) >
+
+ <!ATTLIST RmEffectWorkspace
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_EFFECT CDATA #REQUIRED
+ VALIDATION_STRING CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmEffectGroup
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDirectXEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLESEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmHLSLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ TARGET CDATA #REQUIRED
+ ENTRY_POINT CDATA #REQUIRED
+ COMPILER_FLAGS CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmGLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderConstant
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmSampler
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE_INDEX CDATA #REQUIRED
+ VERTEX_TEXTURE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmLightObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderStateBlock
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmState
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMap
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStream
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STRIDE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamChannel
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ DATA_SIZE CDATA #REQUIRED
+ DATA_TYPE CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ USAGE_INDEX CDATA #REQUIRED
+ ATTRIBUTE_NAME CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIENTATION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMapReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderableTexture
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ WIDTH CDATA #REQUIRED
+ HEIGHT CDATA #REQUIRED
+ FORMAT CDATA #REQUIRED
+ USE_VIEWPORT_DIMENSIONS ( TRUE | FALSE ) #REQUIRED
+ GENERATE_MIPMAPS ( TRUE | FALSE ) #REQUIRED
+ WIDTH_RATIO CDATA #REQUIRED
+ HEIGHT_RATIO CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderTarget
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ RENDER_TO_SCREEN ( TRUE | FALSE ) #REQUIRED
+ COLOR_CLEAR ( TRUE | FALSE ) #REQUIRED
+ DEPTH_CLEAR ( TRUE | FALSE ) #REQUIRED
+ CLEAR_COLOR_VALUE CDATA #REQUIRED
+ DEPTH_CLEAR_VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmBooleanVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmFloatVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmVectorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmMatrixVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ VALUE_4 CDATA #REQUIRED
+ VALUE_5 CDATA #REQUIRED
+ VALUE_6 CDATA #REQUIRED
+ VALUE_7 CDATA #REQUIRED
+ VALUE_8 CDATA #REQUIRED
+ VALUE_9 CDATA #REQUIRED
+ VALUE_10 CDATA #REQUIRED
+ VALUE_11 CDATA #REQUIRED
+ VALUE_12 CDATA #REQUIRED
+ VALUE_13 CDATA #REQUIRED
+ VALUE_14 CDATA #REQUIRED
+ VALUE_15 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VARIABLE_TYPE ( FLOAT | INTEGER | BOOLEAN ) #REQUIRED
+ ROWS CDATA #REQUIRED
+ COLUMNS CDATA #REQUIRED
+ FIXED_SIZE ( TRUE | FALSE ) #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariableValue
+ ROW_INDEX CDATA #REQUIRED
+ COLUMN_INDEX CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmColorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmIntegerVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmStringVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm2DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCubemapVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm3DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ LIGHT_ENABLED ( TRUE | FALSE ) #REQUIRED
+ LIGHT_TYPE ( POSITIONAL | DIRECTIONAL | SPOTLIGHT ) #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ POSITION_0 CDATA #REQUIRED
+ POSITION_1 CDATA #REQUIRED
+ POSITION_2 CDATA #REQUIRED
+ DIRECTION_0 CDATA #REQUIRED
+ DIRECTION_1 CDATA #REQUIRED
+ DIRECTION_2 CDATA #REQUIRED
+ ATTENUATION_0 CDATA #REQUIRED
+ ATTENUATION_1 CDATA #REQUIRED
+ ATTENUATION_2 CDATA #REQUIRED
+ SPOTLIGHT_THETA CDATA #REQUIRED
+ SPOTLIGHT_PHI CDATA #REQUIRED
+ RANGE CDATA #REQUIRED
+ FALLOFF CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ EMISSIVE_0 CDATA #REQUIRED
+ EMISSIVE_1 CDATA #REQUIRED
+ EMISSIVE_2 CDATA #REQUIRED
+ EMISSIVE_3 CDATA #REQUIRED
+ SPECULAR_POWER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRegistryBranch
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPlugInData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PLUGIN_GUID CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmClipboardNode
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCamera
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ CAMERA_POSITION_X CDATA #REQUIRED
+ CAMERA_POSITION_Y CDATA #REQUIRED
+ CAMERA_POSITION_Z CDATA #REQUIRED
+ LOOK_AT_VECTOR_X CDATA #REQUIRED
+ LOOK_AT_VECTOR_Y CDATA #REQUIRED
+ LOOK_AT_VECTOR_Z CDATA #REQUIRED
+ UP_VECTOR_X CDATA #REQUIRED
+ UP_VECTOR_Y CDATA #REQUIRED
+ UP_VECTOR_Z CDATA #REQUIRED
+ FOV CDATA #REQUIRED
+ NEAR_CLIP_PLANE CDATA #REQUIRED
+ FAR_CLIP_PLANE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCameraReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ USE_ACTIVE_CAMERA ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderCode
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+ <!ATTLIST RmTextDataBlock
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+]>
+<RENDER_MONKEY>
+ <RmEffectWorkspace NAME="Effect Workspace" API="" ACTIVE_EFFECT="Effect Workspace.Textured" VALIDATION_STRING="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_REGISTRY" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_LOCAL" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_PLUGIN" API="" XML_VERSION="RenderMonkey 1.71"><RmTextDataBlock TYPE="TEXT"><![CDATA[
+<DockingPaneLayouts><Application_Layout><Pane-1><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Artist Editor</Title><ID>1001</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>12</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>12</LastHolder></Pane-1><Pane-2><Type>0</Type><DockingCX>254</DockingCX><DockingCY>374</DockingCY><Title>u_fogColor</Title><ID>1100</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>6</DockingHolder><FloatingHolder>17</FloatingHolder><LastHolder>17</LastHolder></Pane-2><Pane-3><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>1</Horiz><Pane-1>4</Pane-1><Pane-2>5</Pane-2><Pane-3>6</Pane-3><Pane-4>7</Pane-4><Panes>4</Panes></Pane-3><Pane-4><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-4><Pane-5><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-5><Pane-6><Type>1</Type><DockingCX>254</DockingCX><DockingCY>374</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-6><Pane-7><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>0</Horiz><Pane-1>8</Pane-1><Pane-2>13</Pane-2><Panes>2</Panes></Pane-7><Pane-8><Type>2</Type><DockingCX>0</DockingCX><DockingCY>641</DockingCY><Horiz>1</Horiz><Pane-1>9</Pane-1><Pane-2>11</Pane-2><Pane-3>12</Pane-3><Panes>3</Panes></Pane-8><Pane-9><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>10</Selected><Panes>1</Panes><Pane-1>10</Pane-1></Pane-9><Pane-10><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Workspace</Title><ID>1000</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>9</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>9</LastHolder></Pane-10><Pane-11><Type>4</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY></Pane-11><Pane-12><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-12><Pane-13><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>14</Selected><Panes>1</Panes><Pane-1>14</Pane-1></Pane-13><Pane-14><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Output</Title><ID>1002</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>13</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>13</LastHolder></Pane-14><Pane-15><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>16</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>406</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>254</WindowRectRightPos></Pane-15><Pane-16><Type>2</Type><DockingCX>254</DockingCX><DockingCY>374</DockingCY><Horiz>1</Horiz><Pane-1>17</Pane-1><Panes>1</Panes></Pane-16><Pane-17><Type>1</Type><DockingCX>254</DockingCX><DockingCY>374</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-17><Pane-18><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_fogMaxDist</Title><ID>1101</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>5</DockingHolder><FloatingHolder>21</FloatingHolder><LastHolder>21</LastHolder></Pane-18><Pane-19><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>20</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-19><Pane-20><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>21</Pane-1><Panes>1</Panes></Pane-20><Pane-21><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-21><Pane-22><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_fogMinDist</Title><ID>1102</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>4</DockingHolder><FloatingHolder>25</FloatingHolder><LastHolder>25</LastHolder></Pane-22><Pane-23><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>24</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-23><Pane-24><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>25</Pane-1><Panes>1</Panes></Pane-24><Pane-25><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-25><Summary><TopContainer>3</TopContainer><Client>11</Client><Panes>25</Panes></Summary></Application_Layout></DockingPaneLayouts>
+]]></RmTextDataBlock>
+ <RmRegistryBranch NAME="RmColorEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured.u_fogColor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1100" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="FloatingPoint" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="FALSE"/>
+ <RmIntegerVariable NAME="ColorType" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="LargeSize" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="TRUE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmScalarEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured.u_fogMaxDist" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1101" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="Effect Workspace.Textured.u_fogMinDist" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1102" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderStateBlockEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="54" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="70" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1283" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="434" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewDx9Window" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLESWindow" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLWindow" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EffectPlacementRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewGLPreview" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmLightEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NoteEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderableTextureEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderTargetEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmShaderEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Fragment Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Pass 0]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureGenerator" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+3/12/2007 19:42:31]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey Version 1.80 (build 125)]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="XML_VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey 1.71]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="BASE_WORKSPACE_PATH" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+D:\svn\redbook\Code\Chapter_9\RM_LinearFog\]]></RmTextDataBlock></RmStringVariable>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmOpenGLESEffect NAME="Textured" API="OpenGL ES" ACTIVE_CAMERA="Camera">
+ <RmCamera NAME="Camera" API="" CAMERA_POSITION_X="-198.295074" CAMERA_POSITION_Y="-0.681522" CAMERA_POSITION_Z="-26.049891" LOOK_AT_VECTOR_X="0.000000" LOOK_AT_VECTOR_Y="0.000000" LOOK_AT_VECTOR_Z="0.000000" UP_VECTOR_X="-0.013366" UP_VECTOR_Y="0.997044" UP_VECTOR_Z="0.075663" FOV="45.000000" NEAR_CLIP_PLANE="1.000000" FAR_CLIP_PLANE="1000.000000"/>
+ <RmFloatVariable NAME="u_fogMinDist" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="200.000000" MIN="-1.000000" MAX="0.000000" CLAMP="FALSE"/>
+ <RmFloatVariable NAME="u_fogMaxDist" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="500.000000" MIN="-1.000000" MAX="1.000000" CLAMP="FALSE"/>
+ <RmVectorVariable NAME="u_eyePos" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewPosition" VALUE_0="-198.295074" VALUE_1="-0.681522" VALUE_2="-26.049891" VALUE_3="1.000000" MIN="-10.000000" MAX="10.000000" CLAMP="FALSE" NORMALIZE="FALSE"/>
+ <RmMatrixVariable NAME="matView" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="View" VALUE_0="-0.129607" VALUE_1="-0.076759" VALUE_2="0.988590" VALUE_3="0.000003" VALUE_4="-0.013366" VALUE_5="0.997044" VALUE_6="0.075663" VALUE_7="0.000043" VALUE_8="-0.991475" VALUE_9="-0.003408" VALUE_10="-0.130249" VALUE_11="-200.000000" VALUE_12="0.000000" VALUE_13="0.000000" VALUE_14="0.000000" VALUE_15="1.000000"/>
+ <RmMatrixVariable NAME="matViewProjection" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="-0.283274" VALUE_1="-0.167769" VALUE_2="2.160711" VALUE_3="0.000006" VALUE_4="-0.032269" VALUE_5="2.407077" VALUE_6="0.182668" VALUE_7="0.000103" VALUE_8="0.992468" VALUE_9="0.003411" VALUE_10="0.130380" VALUE_11="199.199203" VALUE_12="0.991475" VALUE_13="0.003408" VALUE_14="0.130249" VALUE_15="200.000000"/>
+ <RmColorVariable NAME="u_fogColor" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="0.000000" VALUE_1="0.000000" VALUE_2="0.000000" VALUE_3="0.000000"/>
+ <Rm2DTextureVariable NAME="base" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" FILE_NAME="Terrain.tga" ORIGIN="0"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="20">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="rm_Vertex"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="rm_TexCoord0"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="Model" API="" FILE_NAME=".\Terrain.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Pass 0" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="Model" API=""/>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+
+uniform vec4 u_fogColor;
+uniform float u_fogMaxDist;
+uniform float u_fogMinDist;
+uniform sampler2D baseMap;
+
+varying vec2 v_texCoord;
+varying float v_eyeDist;
+
+float computeLinearFogFactor()
+{
+ float factor;
+
+ // Compute linear fog equation
+ factor = (u_fogMaxDist - v_eyeDist) /
+ (u_fogMaxDist - u_fogMinDist );
+
+ // Clamp in the [0,1] range
+ factor = clamp( factor, 0.0, 1.0 );
+
+ return factor;
+}
+
+void main( void )
+{
+ float fogFactor = computeLinearFogFactor();
+ vec4 fogColor = fogFactor * u_fogColor;
+ vec4 baseColor = texture2D( baseMap, v_texCoord );
+
+ // Compute final color as a lerp with fog factor
+ gl_FragColor = baseColor * fogFactor +
+ fogColor * (1.0 - fogFactor);
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform mat4 matViewProjection;
+uniform mat4 matView;
+uniform vec4 u_eyePos;
+
+attribute vec4 rm_Vertex;
+attribute vec2 rm_TexCoord0;
+
+varying vec2 v_texCoord;
+varying float v_eyeDist;
+
+void main( void )
+{
+ // Transform vertex to view-space
+ vec4 vViewPos = matView * rm_Vertex;
+
+ // Compute the distance to eye
+ v_eyeDist = sqrt( (vViewPos.x - u_eyePos.x) *
+ (vViewPos.x - u_eyePos.x) +
+ (vViewPos.y - u_eyePos.y) *
+ (vViewPos.y - u_eyePos.y) +
+ (vViewPos.z - u_eyePos.z) *
+ (vViewPos.z - u_eyePos.z) );
+
+ gl_Position = matViewProjection * rm_Vertex;
+ v_texCoord = rm_TexCoord0.xy;
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="baseMap" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="base" API=""/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="6" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmSampler NAME="baseMap" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="matViewProjection" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_eyePos" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_fogColor" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_fogMaxDist" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_fogMinDist" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="matView" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ </RmEffectWorkspace>
+</RENDER_MONKEY>
diff --git a/third_party/gles2_book/Chapter_10/RM_LinearFog/Terrain.3ds b/third_party/gles2_book/Chapter_10/RM_LinearFog/Terrain.3ds
new file mode 100644
index 0000000..a46d787
--- /dev/null
+++ b/third_party/gles2_book/Chapter_10/RM_LinearFog/Terrain.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_10/RM_LinearFog/Terrain.tga b/third_party/gles2_book/Chapter_10/RM_LinearFog/Terrain.tga
new file mode 100644
index 0000000..47d5117
--- /dev/null
+++ b/third_party/gles2_book/Chapter_10/RM_LinearFog/Terrain.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_11/Multisample/Multisample.c b/third_party/gles2_book/Chapter_11/Multisample/Multisample.c
new file mode 100644
index 0000000..596f340
--- /dev/null
+++ b/third_party/gles2_book/Chapter_11/Multisample/Multisample.c
@@ -0,0 +1,302 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// Multisample.c
+//
+// This example shows various multi-sampling
+// operations.
+//
+#include <stdlib.h>
+#include <stdio.h>
+#include "esUtil.h"
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+
+ // Attribute locations
+ GLint positionLoc;
+
+ // Uniform locations
+ GLint colorLoc;
+
+} UserData;
+
+///
+// Initialize the shader and program object
+//
+int Init ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+ GLbyte vShaderStr[] =
+ "attribute vec4 a_position; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = a_position; \n"
+ "} \n";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float; \n"
+ "uniform vec4 u_color; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = u_color; \n"
+ "} \n";
+
+ // Load the shaders and get a linked program object
+ userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
+
+ // Get the attribute locations
+ userData->positionLoc = glGetAttribLocation ( userData->programObject, "a_position" );
+
+ // Get the sampler location
+ userData->colorLoc = glGetUniformLocation ( userData->programObject, "u_color" );
+
+ // Set the clear color
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+
+ // Set the stencil clear value
+ glClearStencil ( 0x1 );
+
+ // Set the depth clear value
+ glClearDepthf( 0.75f );
+
+ // Enable the depth and stencil tests
+ glEnable( GL_DEPTH_TEST );
+ glEnable( GL_STENCIL_TEST );
+
+ return TRUE;
+}
+
+///
+// Initialize the stencil buffer values, and then use those
+// values to control rendering
+//
+void Draw ( ESContext *esContext )
+{
+ int i;
+
+ UserData *userData = esContext->userData;
+
+ GLfloat vVertices[] = {
+ -0.75f, 0.25f, 0.50f, // Quad #0
+ -0.25f, 0.25f, 0.50f,
+ -0.25f, 0.75f, 0.50f,
+ -0.75f, 0.75f, 0.50f,
+ 0.25f, 0.25f, 0.90f, // Quad #1
+ 0.75f, 0.25f, 0.90f,
+ 0.75f, 0.75f, 0.90f,
+ 0.25f, 0.75f, 0.90f,
+ -0.75f, -0.75f, 0.50f, // Quad #2
+ -0.25f, -0.75f, 0.50f,
+ -0.25f, -0.25f, 0.50f,
+ -0.75f, -0.25f, 0.50f,
+ 0.25f, -0.75f, 0.50f, // Quad #3
+ 0.75f, -0.75f, 0.50f,
+ 0.75f, -0.25f, 0.50f,
+ 0.25f, -0.25f, 0.50f,
+ -1.00f, -1.00f, 0.00f, // Big Quad
+ 1.00f, -1.00f, 0.00f,
+ 1.00f, 1.00f, 0.00f,
+ -1.00f, 1.00f, 0.00f
+ };
+
+ GLubyte indices[][6] = {
+ { 0, 1, 2, 0, 2, 3 }, // Quad #0
+ { 4, 5, 6, 4, 6, 7 }, // Quad #1
+ { 8, 9, 10, 8, 10, 11 }, // Quad #2
+ { 12, 13, 14, 12, 14, 15 }, // Quad #3
+ { 16, 17, 18, 16, 18, 19 } // Big Quad
+ };
+
+#define NumTests 4
+ GLfloat colors[NumTests][4] = {
+ { 1.0f, 0.0f, 0.0f, 1.0f },
+ { 0.0f, 1.0f, 0.0f, 1.0f },
+ { 0.0f, 0.0f, 1.0f, 1.0f },
+ { 1.0f, 1.0f, 0.0f, 0.0f }
+ };
+
+ GLint numStencilBits;
+ GLuint stencilValues[NumTests] = {
+ 0x7, // Result of test 0
+ 0x0, // Result of test 1
+ 0x2, // Result of test 2
+ 0xff // Result of test 3. We need to fill this
+ // value in a run-time
+ };
+
+ // Set the viewport
+ glViewport ( 0, 0, esContext->width, esContext->height );
+
+ // Clear the color, depth, and stencil buffers. At this
+ // point, the stencil buffer will be 0x1 for all pixels
+ glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex position
+ glVertexAttribPointer ( userData->positionLoc, 3, GL_FLOAT,
+ GL_FALSE, 0, vVertices );
+
+ glEnableVertexAttribArray ( userData->positionLoc );
+
+ // Test 0:
+ //
+ // Initialize upper-left region. In this case, the
+ // stencil-buffer values will be replaced because the
+ // stencil test for the rendered pixels will fail the
+ // stencil test, which is
+ //
+ // ref mask stencil mask
+ // ( 0x7 & 0x3 ) < ( 0x1 & 0x7 )
+ //
+ // The value in the stencil buffer for these pixels will
+ // be 0x7.
+ //
+ glStencilFunc( GL_LESS, 0x7, 0x3 );
+ glStencilOp( GL_REPLACE, GL_DECR, GL_DECR );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices[0] );
+
+ // Test 1:
+ //
+ // Initialize the upper-right region. Here, we'll decrement
+ // the stencil-buffer values where the stencil test passes
+ // but the depth test fails. The stencil test is
+ //
+ // ref mask stencil mask
+ // ( 0x3 & 0x3 ) > ( 0x1 & 0x3 )
+ //
+ // but where the geometry fails the depth test. The
+ // stencil values for these pixels will be 0x0.
+ //
+ glStencilFunc( GL_GREATER, 0x3, 0x3 );
+ glStencilOp( GL_KEEP, GL_DECR, GL_KEEP );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices[1] );
+
+ // Test 2:
+ //
+ // Initialize the lower-left region. Here we'll increment
+ // (with saturation) the stencil value where both the
+ // stencil and depth tests pass. The stencil test for
+ // these pixels will be
+ //
+ // ref mask stencil mask
+ // ( 0x1 & 0x3 ) == ( 0x1 & 0x3 )
+ //
+ // The stencil values for these pixels will be 0x2.
+ //
+ glStencilFunc( GL_EQUAL, 0x1, 0x3 );
+ glStencilOp( GL_KEEP, GL_INCR, GL_INCR );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices[2] );
+
+ // Test 3:
+ //
+ // Finally, initialize the lower-right region. We'll invert
+ // the stencil value where the stencil tests fails. The
+ // stencil test for these pixels will be
+ //
+ // ref mask stencil mask
+ // ( 0x2 & 0x1 ) == ( 0x1 & 0x1 )
+ //
+ // The stencil value here will be set to ~((2^s-1) & 0x1),
+ // (with the 0x1 being from the stencil clear value),
+ // where 's' is the number of bits in the stencil buffer
+ //
+ glStencilFunc( GL_EQUAL, 0x2, 0x1 );
+ glStencilOp( GL_INVERT, GL_KEEP, GL_KEEP );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices[3] );
+
+ // Since we don't know at compile time how many stecil bits are present,
+ // we'll query, and update the value correct value in the
+ // stencilValues arrays for the fourth tests. We'll use this value
+ // later in rendering.
+ glGetIntegerv( GL_STENCIL_BITS, &numStencilBits );
+
+ stencilValues[3] = ~(((1 << numStencilBits) - 1) & 0x1) & 0xff;
+
+ // Use the stencil buffer for controlling where rendering will
+ // occur. We diable writing to the stencil buffer so we
+ // can test against them without modifying the values we
+ // generated.
+ glStencilMask( 0x0 );
+
+ for ( i = 0; i < NumTests; ++i )
+ {
+ glStencilFunc( GL_EQUAL, stencilValues[i], 0xff );
+ glUniform4fv( userData->colorLoc, 1, colors[i] );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, indices[4] );
+ }
+
+ eglSwapBuffers ( esContext->eglDisplay, esContext->eglSurface );
+}
+
+
+///
+// Cleanup
+//
+void ShutDown ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+
+ // Delete program object
+ glDeleteProgram ( userData->programObject );
+}
+
+
+///
+// Handle keyboard input
+//
+void Key ( ESContext *esContext, unsigned char key, int x, int y)
+{
+ switch ( key )
+ {
+ case 'm':
+ printf( "Saw an 'm'\n" );
+ break;
+
+ case 'a':
+ printf( "Saw an 'a'\n" );
+ break;
+
+ case '1':
+ printf( "Saw a '1'\n" );
+ break;
+
+ case 033: // ASCII Escape Key
+ ShutDown( esContext );
+ exit( 0 );
+ break;
+ }
+}
+
+
+int main ( int argc, char *argv[] )
+{
+ ESContext esContext;
+ UserData userData;
+
+ esInitContext ( &esContext );
+ esContext.userData = &userData;
+
+ esCreateWindow ( &esContext, "Multi-sampling", 320, 240, ES_WINDOW_RGB );
+
+ if ( !Init ( &esContext ) )
+ return 0;
+
+ esRegisterDrawFunc ( &esContext, Draw );
+ esRegisterKeyFunc( &esContext, Key );
+
+ esMainLoop ( &esContext );
+
+ ShutDown ( &esContext );
+}
diff --git a/third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c b/third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c
new file mode 100644
index 0000000..1c899d0
--- /dev/null
+++ b/third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.c
@@ -0,0 +1,243 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// Stencil_Test.c
+//
+// This example shows various stencil buffer
+// operations.
+//
+#include <stdlib.h>
+#include "Stencil_Test.h"
+
+///
+// Initialize the shader and program object
+//
+int stInit ( ESContext *esContext )
+{
+ STUserData *userData = esContext->userData;
+ GLbyte vShaderStr[] =
+ "attribute vec4 a_position; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = a_position; \n"
+ "} \n";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float; \n"
+ "uniform vec4 u_color; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = u_color; \n"
+ "} \n";
+
+ GLfloat vVertices[] = {
+ -0.75f, 0.25f, 0.50f, // Quad #0
+ -0.25f, 0.25f, 0.50f,
+ -0.25f, 0.75f, 0.50f,
+ -0.75f, 0.75f, 0.50f,
+ 0.25f, 0.25f, 0.50f, // Quad #1
+ 0.75f, 0.25f, 0.50f,
+ 0.75f, 0.75f, 0.50f,
+ 0.25f, 0.75f, 0.50f,
+ -0.75f, -0.75f, 0.50f, // Quad #2
+ -0.25f, -0.75f, 0.50f,
+ -0.25f, -0.25f, 0.50f,
+ -0.75f, -0.25f, 0.50f,
+ 0.25f, -0.75f, 0.50f, // Quad #3
+ 0.75f, -0.75f, 0.50f,
+ 0.75f, -0.25f, 0.50f,
+ 0.25f, -0.25f, 0.50f,
+ -1.00f, -1.00f, 0.00f, // Big Quad
+ 1.00f, -1.00f, 0.00f,
+ 1.00f, 1.00f, 0.00f,
+ -1.00f, 1.00f, 0.00f
+ };
+
+ GLubyte indices[] = {
+ 0, 1, 2, 0, 2, 3, // Quad #0
+ 4, 5, 6, 4, 6, 7, // Quad #1
+ 8, 9, 10, 8, 10, 11, // Quad #2
+ 12, 13, 14, 12, 14, 15, // Quad #3
+ 16, 17, 18, 16, 18, 19 // Big Quad
+ };
+
+ // Load the shaders and get a linked program object
+ userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
+
+ // Get the attribute locations
+ userData->positionLoc = glGetAttribLocation ( userData->programObject, "a_position" );
+
+ // Get the sampler location
+ userData->colorLoc = glGetUniformLocation ( userData->programObject, "u_color" );
+
+ // Load vertex data
+ glGenBuffers ( 2, userData->vboIds );
+ glBindBuffer ( GL_ARRAY_BUFFER, userData->vboIds[0] );
+ glBufferData ( GL_ARRAY_BUFFER, sizeof(vVertices),
+ vVertices, GL_STATIC_DRAW );
+ glBindBuffer ( GL_ELEMENT_ARRAY_BUFFER, userData->vboIds[1] );
+ glBufferData ( GL_ELEMENT_ARRAY_BUFFER, sizeof(indices),
+ indices, GL_STATIC_DRAW );
+
+ // Set the clear color
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+
+ // Set the stencil clear value
+ glClearStencil ( 0x1 );
+
+ // Set the depth clear value
+ glClearDepthf( 0.75f );
+
+ // Enable the depth and stencil tests
+ glEnable( GL_DEPTH_TEST );
+ glEnable( GL_STENCIL_TEST );
+
+ return TRUE;
+}
+
+///
+// Initialize the stencil buffer values, and then use those
+// values to control rendering
+//
+void stDraw ( ESContext *esContext )
+{
+ int i;
+ GLubyte *offset = NULL;
+
+ STUserData *userData = esContext->userData;
+
+#define NumTests 4
+ GLfloat colors[NumTests][4] = {
+ { 1.0f, 0.0f, 0.0f, 1.0f },
+ { 0.0f, 1.0f, 0.0f, 1.0f },
+ { 0.0f, 0.0f, 1.0f, 1.0f },
+ { 1.0f, 1.0f, 0.0f, 1.0f }
+ };
+
+ GLuint stencilValues[NumTests] = {
+ 0x7, // Result of test 0
+ 0x0, // Result of test 1
+ 0x2, // Result of test 2
+ 0xfe // Result of test 3
+ };
+
+ // Set the viewport
+ glViewport ( 0, 0, esContext->width, esContext->height );
+
+ // Clear the color, depth, and stencil buffers. At this
+ // point, the stencil buffer will be 0x1 for all pixels
+ glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex position
+ glVertexAttribPointer ( userData->positionLoc, 3, GL_FLOAT,
+ GL_FALSE, 0, 0 );
+
+ glEnableVertexAttribArray ( userData->positionLoc );
+
+ // Test 0:
+ //
+ // Initialize upper-left region. In this case, the
+ // stencil-buffer values will be replaced because the
+ // stencil test for the rendered pixels will fail the
+ // stencil test, which is
+ //
+ // ref mask stencil mask
+ // ( 0x7 & 0x3 ) < ( 0x1 & 0x7 )
+ //
+ // The value in the stencil buffer for these pixels will
+ // be 0x7.
+ //
+ glStencilFunc( GL_LESS, 0x7, 0x3 );
+ glStencilOp( GL_REPLACE, GL_DECR, GL_DECR );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, offset );
+
+ // Test 1:
+ //
+ // Initialize the upper-right region. Here, we'll decrement
+ // the stencil-buffer values where the stencil test passes
+ // but the depth test fails. The stencil test is
+ //
+ // ref mask stencil mask
+ // ( 0x3 & 0x3 ) > ( 0x1 & 0x3 )
+ //
+ // but where the geometry fails the depth test. The
+ // stencil values for these pixels will be 0x0.
+ //
+ glStencilFunc( GL_GREATER, 0x3, 0x3 );
+ glStencilOp( GL_KEEP, GL_DECR, GL_KEEP );
+ offset += 6;
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, offset );
+
+ // Test 2:
+ //
+ // Initialize the lower-left region. Here we'll increment
+ // (with saturation) the stencil value where both the
+ // stencil and depth tests pass. The stencil test for
+ // these pixels will be
+ //
+ // ref mask stencil mask
+ // ( 0x1 & 0x3 ) == ( 0x1 & 0x3 )
+ //
+ // The stencil values for these pixels will be 0x2.
+ //
+ glStencilFunc( GL_EQUAL, 0x1, 0x3 );
+ glStencilOp( GL_KEEP, GL_INCR, GL_INCR );
+ offset += 6;
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, offset );
+
+ // Test 3:
+ //
+ // Finally, initialize the lower-right region. We'll invert
+ // the stencil value where the stencil tests fails. The
+ // stencil test for these pixels will be
+ //
+ // ref mask stencil mask
+ // ( 0x2 & 0x1 ) == ( 0x1 & 0x1 )
+ //
+ // The stencil value here will be set to ~((2^s-1) & 0x1),
+ // (with the 0x1 being from the stencil clear value),
+ // where 's' is the number of bits in the stencil buffer
+ //
+ glStencilFunc( GL_EQUAL, 0x2, 0x1 );
+ glStencilOp( GL_INVERT, GL_KEEP, GL_KEEP );
+ offset += 6;
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, offset );
+
+ // Use the stencil buffer for controlling where rendering will
+ // occur. We diable writing to the stencil buffer so we
+ // can test against them without modifying the values we
+ // generated.
+ glStencilMask( 0x0 );
+ offset += 6;
+ for ( i = 0; i < NumTests; ++i )
+ {
+ glStencilFunc( GL_EQUAL, stencilValues[i], 0xff );
+ glUniform4fv( userData->colorLoc, 1, colors[i] );
+ glDrawElements( GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, offset );
+ }
+ glStencilMask( 0xff );
+}
+
+///
+// Cleanup
+//
+void stShutDown ( ESContext *esContext )
+{
+ STUserData *userData = esContext->userData;
+
+ // Delete program object
+ glDeleteProgram ( userData->programObject );
+
+ // Delete vertex buffer objects
+ glDeleteBuffers ( 2, userData->vboIds );
+}
diff --git a/third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.h b/third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.h
new file mode 100644
index 0000000..ff6bff9
--- /dev/null
+++ b/third_party/gles2_book/Chapter_11/Stencil_Test/Stencil_Test.h
@@ -0,0 +1,45 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+#ifndef STENCIL_TEST_H
+#define STENCIL_TEST_H
+
+#include "esUtil.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+
+ // Attribute locations
+ GLint positionLoc;
+
+ // Uniform locations
+ GLint colorLoc;
+
+ // Vertex buffer object handles
+ GLuint vboIds[2];
+
+} STUserData;
+
+extern int stInit ( ESContext *esContext );
+
+extern void stDraw ( ESContext *esContext );
+
+extern void stShutDown ( ESContext *esContext );
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+#endif // STENCIL_TEST_H
diff --git a/third_party/gles2_book/Chapter_13/EnvironmentMapping/EnvironmentMapping.rfx b/third_party/gles2_book/Chapter_13/EnvironmentMapping/EnvironmentMapping.rfx
new file mode 100644
index 0000000..8c32adb
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/EnvironmentMapping/EnvironmentMapping.rfx
@@ -0,0 +1,1204 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE RENDER_MONKEY [
+ <!ELEMENT RENDER_MONKEY
+ (
+ RmEffectWorkspace |
+ RmRegistryBranch |
+ RmClipboardNode
+ )?>
+
+ <!ELEMENT RmEffectWorkspace
+ (
+ RmRegistryBranch?,
+ RmPlugInData?,
+ RmStringVariable*,
+ (
+ ( RmDirectXEffect, RmOpenGLEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLEffect, RmDirectXEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLESEffect, RmDirectXEffect?, RmOpenGLEffect? )
+ )?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmEffectGroup
+ )*
+ )>
+
+ <!ELEMENT RmEffectGroup
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData
+ )*
+ )>
+
+ <!ELEMENT RmDirectXEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLESEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLESPass
+ )*
+ )>
+
+ <!ELEMENT RmPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ (
+ ( RmHLSLShader | RmShader ),
+ ( RmShader | RmHLSLShader )?
+ )
+ )?,
+ RmRenderTarget*,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject
+ )*
+ )>
+
+ <!ELEMENT RmGLPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLShader, RmGLShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLESPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLESShader, RmGLESShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant
+ )*
+ )>
+
+ <!ELEMENT RmHLSLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmGLESShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmTextureObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmTextureReference?,
+ RmState*
+ )>
+
+ <!ELEMENT RmLightObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmLightReference?
+ )>
+
+ <!ELEMENT RmMaterialObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmMaterialReference?
+ )>
+
+ <!ELEMENT RmRenderStateBlock
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmState
+ )*
+ )>
+
+ <!ELEMENT RmStreamMap
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmStream
+ )*
+ )>
+
+ <!ELEMENT RmStream ( RmPlugInData?, RmStreamChannel* )>
+
+ <!ELEMENT RmModelData ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmTextureReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmLightReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmMaterialReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmCameraReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmModelReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmStreamMapReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderableTexture ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderTarget ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmBooleanVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmFloatVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmVectorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMatrixVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmColorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmIntegerVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm2DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCubemapVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm3DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmLightVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMaterialVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCamera ( RmPlugInData?, RmStringVariable* )>
+
+ <!ELEMENT RmStringVariable ( RmTextDataBlock, RmPlugInData? )>
+
+ <!ELEMENT RmDynamicVariable
+ (
+ RmDynamicVariableValueContainer,
+ RmPlugInData?,
+ RmStringVariable?
+ )>
+
+ <!ELEMENT RmDynamicVariableValueContainer
+ (
+ RmPlugInData?,
+ RmDynamicVariableValue*
+ )>
+
+ <!ELEMENT RmTextDataBlock ( #PCDATA ) >
+
+ <!ELEMENT RmRegistryBranch
+ (
+ RmTextDataBlock?,
+ (
+ RmRegistryBranch |
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable
+ )*
+ )>
+
+ <!ELEMENT RmPlugInData
+ (
+ RmTextDataBlock?,
+ (
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable
+ )*
+ )>
+
+ <!ELEMENT RmClipboardNode
+ (
+ RmTextDataBlock?,
+ (
+ RmEffectWorkspace |
+ RmEffectGroup |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmPass |
+ RmGLPass |
+ RmGLESPass |
+ RmShader |
+ RmHLSLShader |
+ RmGLShader |
+ RmGLESShader |
+ RmShaderConstant |
+ RmSampler |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmRenderStateBlock |
+ RmState |
+ RmStreamMap |
+ RmStream |
+ RmStreamChannel |
+ RmModelData |
+ RmTextureReference |
+ RmLightReference |
+ RmMaterialReference |
+ RmModelReference |
+ RmStreamMapReference |
+ RmRenderableTexture |
+ RmRenderTarget |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmDynamicVariableValue |
+ RmColorVariable |
+ RmIntegerVariable |
+ RmStringVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRegistryBranch |
+ RmPlugInData |
+ RmCamera |
+ RmCameraReference
+ )*
+ )>
+
+ <!ELEMENT RmStreamChannel ( RmPlugInData? ) >
+ <!ELEMENT RmShaderConstant ( RmPlugInData? ) >
+ <!ELEMENT RmSampler ( RmPlugInData? ) >
+ <!ELEMENT RmState ( RmPlugInData? ) >
+ <!ELEMENT RmDynamicVariableValue ( RmPlugInData? ) >
+
+ <!ELEMENT RmShaderCode ( #PCDATA ) >
+
+ <!ATTLIST RmEffectWorkspace
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_EFFECT CDATA #REQUIRED
+ VALIDATION_STRING CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmEffectGroup
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDirectXEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLESEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmHLSLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ TARGET CDATA #REQUIRED
+ ENTRY_POINT CDATA #REQUIRED
+ COMPILER_FLAGS CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmGLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderConstant
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmSampler
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE_INDEX CDATA #REQUIRED
+ VERTEX_TEXTURE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmLightObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderStateBlock
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmState
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMap
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStream
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STRIDE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamChannel
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ DATA_SIZE CDATA #REQUIRED
+ DATA_TYPE CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ USAGE_INDEX CDATA #REQUIRED
+ ATTRIBUTE_NAME CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIENTATION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMapReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderableTexture
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ WIDTH CDATA #REQUIRED
+ HEIGHT CDATA #REQUIRED
+ FORMAT CDATA #REQUIRED
+ USE_VIEWPORT_DIMENSIONS ( TRUE | FALSE ) #REQUIRED
+ GENERATE_MIPMAPS ( TRUE | FALSE ) #REQUIRED
+ WIDTH_RATIO CDATA #REQUIRED
+ HEIGHT_RATIO CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderTarget
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ RENDER_TO_SCREEN ( TRUE | FALSE ) #REQUIRED
+ COLOR_CLEAR ( TRUE | FALSE ) #REQUIRED
+ DEPTH_CLEAR ( TRUE | FALSE ) #REQUIRED
+ CLEAR_COLOR_VALUE CDATA #REQUIRED
+ DEPTH_CLEAR_VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmBooleanVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmFloatVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmVectorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmMatrixVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ VALUE_4 CDATA #REQUIRED
+ VALUE_5 CDATA #REQUIRED
+ VALUE_6 CDATA #REQUIRED
+ VALUE_7 CDATA #REQUIRED
+ VALUE_8 CDATA #REQUIRED
+ VALUE_9 CDATA #REQUIRED
+ VALUE_10 CDATA #REQUIRED
+ VALUE_11 CDATA #REQUIRED
+ VALUE_12 CDATA #REQUIRED
+ VALUE_13 CDATA #REQUIRED
+ VALUE_14 CDATA #REQUIRED
+ VALUE_15 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VARIABLE_TYPE ( FLOAT | INTEGER | BOOLEAN ) #REQUIRED
+ ROWS CDATA #REQUIRED
+ COLUMNS CDATA #REQUIRED
+ FIXED_SIZE ( TRUE | FALSE ) #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariableValue
+ ROW_INDEX CDATA #REQUIRED
+ COLUMN_INDEX CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmColorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmIntegerVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmStringVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm2DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCubemapVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm3DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ LIGHT_ENABLED ( TRUE | FALSE ) #REQUIRED
+ LIGHT_TYPE ( POSITIONAL | DIRECTIONAL | SPOTLIGHT ) #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ POSITION_0 CDATA #REQUIRED
+ POSITION_1 CDATA #REQUIRED
+ POSITION_2 CDATA #REQUIRED
+ DIRECTION_0 CDATA #REQUIRED
+ DIRECTION_1 CDATA #REQUIRED
+ DIRECTION_2 CDATA #REQUIRED
+ ATTENUATION_0 CDATA #REQUIRED
+ ATTENUATION_1 CDATA #REQUIRED
+ ATTENUATION_2 CDATA #REQUIRED
+ SPOTLIGHT_THETA CDATA #REQUIRED
+ SPOTLIGHT_PHI CDATA #REQUIRED
+ RANGE CDATA #REQUIRED
+ FALLOFF CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ EMISSIVE_0 CDATA #REQUIRED
+ EMISSIVE_1 CDATA #REQUIRED
+ EMISSIVE_2 CDATA #REQUIRED
+ EMISSIVE_3 CDATA #REQUIRED
+ SPECULAR_POWER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRegistryBranch
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPlugInData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PLUGIN_GUID CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmClipboardNode
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCamera
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ CAMERA_POSITION_X CDATA #REQUIRED
+ CAMERA_POSITION_Y CDATA #REQUIRED
+ CAMERA_POSITION_Z CDATA #REQUIRED
+ LOOK_AT_VECTOR_X CDATA #REQUIRED
+ LOOK_AT_VECTOR_Y CDATA #REQUIRED
+ LOOK_AT_VECTOR_Z CDATA #REQUIRED
+ UP_VECTOR_X CDATA #REQUIRED
+ UP_VECTOR_Y CDATA #REQUIRED
+ UP_VECTOR_Z CDATA #REQUIRED
+ FOV CDATA #REQUIRED
+ NEAR_CLIP_PLANE CDATA #REQUIRED
+ FAR_CLIP_PLANE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCameraReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ USE_ACTIVE_CAMERA ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderCode
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+ <!ATTLIST RmTextDataBlock
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+]>
+<RENDER_MONKEY>
+ <RmEffectWorkspace NAME="Effect Workspace" API="" ACTIVE_EFFECT="Effect Workspace.Environment Mapping" VALIDATION_STRING="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_REGISTRY" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_LOCAL" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_PLUGIN" API="" XML_VERSION="RenderMonkey 1.71"><RmTextDataBlock TYPE="TEXT"><![CDATA[
+<DockingPaneLayouts><Application_Layout><Pane-1><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Artist Editor</Title><ID>1001</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>8</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>8</LastHolder></Pane-1><Pane-2><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>1</Horiz><Pane-1>3</Pane-1><Panes>1</Panes></Pane-2><Pane-3><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>0</Horiz><Pane-1>4</Pane-1><Pane-2>9</Pane-2><Panes>2</Panes></Pane-3><Pane-4><Type>2</Type><DockingCX>0</DockingCX><DockingCY>641</DockingCY><Horiz>1</Horiz><Pane-1>5</Pane-1><Pane-2>7</Pane-2><Pane-3>8</Pane-3><Panes>3</Panes></Pane-4><Pane-5><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>6</Selected><Panes>1</Panes><Pane-1>6</Pane-1></Pane-5><Pane-6><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Workspace</Title><ID>1000</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>5</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>5</LastHolder></Pane-6><Pane-7><Type>4</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY></Pane-7><Pane-8><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-8><Pane-9><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>10</Selected><Panes>1</Panes><Pane-1>10</Pane-1></Pane-9><Pane-10><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Output</Title><ID>1002</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>9</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>9</LastHolder></Pane-10><Summary><TopContainer>2</TopContainer><Client>7</Client><Panes>10</Panes></Summary></Application_Layout></DockingPaneLayouts>
+]]></RmTextDataBlock>
+ <RmRegistryBranch NAME="RmPreviewGLWindow" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EffectPlacementRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Environment Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="6" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="433" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="400" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmStreamEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured Bump.Stream Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="663" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="400" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="851" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="310" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="Effect Workspace.Environment Mapping.Stream Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="258" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="128" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="851" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="310" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewDx9Window" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLESWindow" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLPreview" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmLightEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NoteEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderableTextureEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderTargetEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmShaderEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Environment Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Fragment Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Teapot]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1014" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="3" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="491" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderStateBlockEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Environment Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="54" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="70" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1283" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="434" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureGenerator" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+27/12/2007 11:33:28]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey Version 1.80 (build 125)]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="XML_VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey 1.71]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="BASE_WORKSPACE_PATH" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+D:\svn\redbook\Code\Chapter_12\EnvironmentMapping\]]></RmTextDataBlock></RmStringVariable>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmOpenGLESEffect NAME="Environment Mapping" API="OpenGL ES" ACTIVE_CAMERA="Camera">
+ <RmCamera NAME="Camera" API="" CAMERA_POSITION_X="-13.744995" CAMERA_POSITION_Y="23.367828" CAMERA_POSITION_Z="-220.341003" LOOK_AT_VECTOR_X="4.617599" LOOK_AT_VECTOR_Y="-4.282429" LOOK_AT_VECTOR_Z="0.204170" UP_VECTOR_X="-0.257297" UP_VECTOR_Y="0.955950" UP_VECTOR_Z="0.141275" FOV="45.000000" NEAR_CLIP_PLANE="70.930000" FAR_CLIP_PLANE="1883.088135"/>
+ <RmDynamicVariable NAME="u_eyePosition" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VARIABLE_TYPE="FLOAT" ROWS="3" COLUMNS="1" FIXED_SIZE="TRUE" MIN="-100.000000" MAX="100.000000" CLAMP="TRUE" NORMALIZE="FALSE">
+ <RmDynamicVariableValueContainer>
+ <RmDynamicVariableValue ROW_INDEX="0" COLUMN_INDEX="0" VALUE="0.000000"/>
+ <RmDynamicVariableValue ROW_INDEX="1" COLUMN_INDEX="0" VALUE="0.000000"/>
+ <RmDynamicVariableValue ROW_INDEX="2" COLUMN_INDEX="0" VALUE="100.000000"/>
+ </RmDynamicVariableValueContainer>
+ </RmDynamicVariable>
+ <RmMatrixVariable NAME="u_matViewProjection" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="-1.965568" VALUE_1="-0.543160" VALUE_2="0.095556" VALUE_3="6.730651" VALUE_4="-0.621170" VALUE_5="2.307867" VALUE_6="0.341067" VALUE_7="12.683241" VALUE_8="0.085555" VALUE_9="-0.128829" VALUE_10="1.027569" VALUE_11="156.895691" VALUE_12="0.082333" VALUE_13="-0.123976" VALUE_14="0.988864" VALUE_15="221.915924"/>
+ <RmMatrixVariable NAME="u_matViewInverse" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewInverse" VALUE_0="-0.962819" VALUE_1="-0.257297" VALUE_2="-0.082333" VALUE_3="-13.744995" VALUE_4="-0.266063" VALUE_5="0.955950" VALUE_6="0.123978" VALUE_7="23.367828" VALUE_8="0.046807" VALUE_9="0.141272" VALUE_10="-0.988863" VALUE_11="-220.341003" VALUE_12="0.000000" VALUE_13="0.000000" VALUE_14="0.000000" VALUE_15="1.000000"/>
+ <RmFloatVariable NAME="u_specularPower" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE="25.000000" MIN="1.000000" MAX="100.000000" CLAMP="TRUE"/>
+ <RmVectorVariable NAME="u_viewPosition" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewPosition" VALUE_0="-13.744995" VALUE_1="23.367828" VALUE_2="-220.341003" VALUE_3="1.000000" MIN="-10.000000" MAX="10.000000" CLAMP="FALSE" NORMALIZE="FALSE"/>
+ <RmDynamicVariable NAME="u_lightPosition" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VARIABLE_TYPE="FLOAT" ROWS="3" COLUMNS="1" FIXED_SIZE="TRUE" MIN="-100.000000" MAX="100.000000" CLAMP="TRUE" NORMALIZE="FALSE">
+ <RmDynamicVariableValueContainer>
+ <RmDynamicVariableValue ROW_INDEX="0" COLUMN_INDEX="0" VALUE="-100.000000"/>
+ <RmDynamicVariableValue ROW_INDEX="1" COLUMN_INDEX="0" VALUE="100.000000"/>
+ <RmDynamicVariableValue ROW_INDEX="2" COLUMN_INDEX="0" VALUE="100.000000"/>
+ </RmDynamicVariableValueContainer>
+ </RmDynamicVariable>
+ <RmColorVariable NAME="u_ambient" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="0.368627" VALUE_1="0.368421" VALUE_2="0.368421" VALUE_3="1.000000"/>
+ <RmColorVariable NAME="u_diffuse" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="0.886275" VALUE_1="0.885003" VALUE_2="0.885003" VALUE_3="1.000000"/>
+ <RmColorVariable NAME="u_specular" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="0.490196" VALUE_1="0.488722" VALUE_2="0.488722" VALUE_3="1.000000"/>
+ <Rm2DTextureVariable NAME="base" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" FILE_NAME="Fieldstone.tga" ORIGIN="0"/>
+ <Rm2DTextureVariable NAME="bump" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" FILE_NAME="FieldstoneBumpDOT3.tga" ORIGIN="0"/>
+ <RmCubemapVariable NAME="cubemap" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" FILE_NAME="Snow.dds" ORIGIN="0"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="56">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="a_vertex"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="a_texcoord0"/>
+ <RmStreamChannel NAME="Normal_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="3" USAGE_INDEX="0" ATTRIBUTE_NAME="a_normal"/>
+ <RmStreamChannel NAME="Binormal_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="7" USAGE_INDEX="0" ATTRIBUTE_NAME="a_binormal"/>
+ <RmStreamChannel NAME="Tangent_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="6" USAGE_INDEX="0" ATTRIBUTE_NAME="a_tangent"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="SkyDome" API="" FILE_NAME=".\Sphere.3ds" ORIENTATION="0"/>
+ <RmModelData NAME="Teapot" API="" FILE_NAME=".\Teapot.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Skybox" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="SkyDome" API=""/>
+ <RmRenderStateBlock NAME="Render State" API="OpenGL ES">
+ <RmState NAME="GL_CullMode" API="OpenGL ES" STATE="8" VALUE="1" USAGE="RENDER_STATE"/>
+ <RmState NAME="GL_WriteMaskDepth" API="OpenGL ES" STATE="54" VALUE="0" USAGE="RENDER_STATE"/>
+ </RmRenderStateBlock>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+
+uniform samplerCube s_cubeMap;
+
+varying vec3 v_texcoord;
+
+
+void main(void)
+{
+ gl_FragColor = textureCube( s_cubeMap, v_texcoord );
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform vec4 u_viewPosition;
+uniform mat4 u_matViewProjection;
+attribute vec4 a_vertex;
+varying vec3 v_texcoord;
+void main(void)
+{
+ vec3 position = a_vertex.xyz;
+
+ position += u_viewPosition.xyz;
+
+ gl_Position = u_matViewProjection * vec4( position, 1.0 );
+
+ v_texcoord = a_vertex.xyz;
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="s_cubeMap" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="cubemap" API=""/>
+ </RmTextureObject>
+ <RmSampler NAME="s_cubeMap" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_viewPosition" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matViewProjection" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ <RmGLESPass NAME="Teapot" API="OpenGL ES" PASS_INDEX="1" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="Teapot" API=""/>
+ <RmRenderStateBlock NAME="Render State" API="OpenGL ES">
+ <RmState NAME="GL_CullMode" API="OpenGL ES" STATE="8" VALUE="3" USAGE="RENDER_STATE"/>
+ <RmState NAME="GL_WriteMaskDepth" API="OpenGL ES" STATE="54" VALUE="1" USAGE="RENDER_STATE"/>
+ </RmRenderStateBlock>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform mat4 u_matViewInverse;
+uniform mat4 u_matViewProjection;
+uniform vec3 u_lightPosition;
+uniform vec3 u_eyePosition;
+
+varying vec2 v_texcoord;
+varying vec3 v_lightDirection;
+varying vec3 v_normal;
+varying vec3 v_binormal;
+varying vec3 v_tangent;
+
+attribute vec4 a_vertex;
+attribute vec2 a_texcoord0;
+attribute vec3 a_normal;
+attribute vec3 a_binormal;
+attribute vec3 a_tangent;
+
+void main( void )
+{
+ // Transform light position into world space
+ vec3 lightPositionWorld = (u_matViewInverse * vec4(u_lightPosition, 1.0)).xyz;
+
+ // Compute world-space light dirction vector
+ vec3 lightDirectionWorld = lightPositionWorld - a_vertex.xyz;
+
+ // Pass the world-space light vector to the fragment shader
+ v_lightDirection = lightDirectionWorld;
+
+ // Transform output position
+ gl_Position = u_matViewProjection * a_vertex;
+
+ // Pass through other attributes
+ v_texcoord = a_texcoord0.xy;
+ v_normal = a_normal;
+ v_binormal = a_binormal;
+ v_tangent = a_tangent;
+
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+
+uniform vec4 u_ambient;
+uniform vec4 u_specular;
+uniform vec4 u_diffuse;
+uniform float u_specularPower;
+
+uniform sampler2D s_baseMap;
+uniform sampler2D s_bumpMap;
+uniform samplerCube s_envMap;
+
+
+varying vec2 v_texcoord;
+varying vec3 v_lightDirection;
+varying vec3 v_normal;
+varying vec3 v_binormal;
+varying vec3 v_tangent;
+
+void main( void )
+{
+ // Fetch basemap color
+ vec4 baseColor = texture2D( s_baseMap, v_texcoord );
+
+ // Fetch the tangent space normal from normal map
+ vec3 normal = texture2D( s_bumpMap, v_texcoord ).xyz;
+
+ // Scale and bias from [0, 1] to [-1, 1]
+ normal = normal * 2.0 - 1.0;
+
+ // Construct a matrix to transform from tangent to world space
+ mat3 tangentToWorldMat = mat3( v_tangent,
+ v_binormal,
+ v_normal );
+
+ // Transform normal to world space and normalize
+ normal = normalize( tangentToWorldMat * normal );
+
+ // Normalize the light direction
+ vec3 lightDirection = normalize( v_lightDirection );
+
+ // Compute N.L
+ float nDotL = dot( normal, lightDirection );
+
+ // Compute reflection vector
+ vec3 reflection = ( 2.0 * normal * nDotL ) - lightDirection;
+
+ // Use the reflection vector to fetch from the environment map
+ vec4 envColor = textureCube( s_envMap, reflection );
+
+ // Output final color
+ gl_FragColor = 0.25 * baseColor + envColor;
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="s_envMap" API="OpenGL ES" STATE_INDEX="2" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="cubemap" API=""/>
+ </RmTextureObject>
+ <RmTextureObject NAME="s_baseMap" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="base" API=""/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="6" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmTextureObject NAME="s_bumpMap" API="OpenGL ES" STATE_INDEX="1" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="bump" API=""/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="6" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmSampler NAME="s_baseMap" API="" REGISTER="-1"/>
+ <RmSampler NAME="s_bumpMap" API="" REGISTER="-1"/>
+ <RmSampler NAME="s_envMap" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_lightPosition" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matViewInverse" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matViewProjection" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ </RmEffectWorkspace>
+</RENDER_MONKEY>
diff --git a/third_party/gles2_book/Chapter_13/EnvironmentMapping/Fieldstone.tga b/third_party/gles2_book/Chapter_13/EnvironmentMapping/Fieldstone.tga
new file mode 100644
index 0000000..8acafae
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/EnvironmentMapping/Fieldstone.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/EnvironmentMapping/FieldstoneBumpDOT3.tga b/third_party/gles2_book/Chapter_13/EnvironmentMapping/FieldstoneBumpDOT3.tga
new file mode 100644
index 0000000..6290f52
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/EnvironmentMapping/FieldstoneBumpDOT3.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/EnvironmentMapping/Snow.dds b/third_party/gles2_book/Chapter_13/EnvironmentMapping/Snow.dds
new file mode 100644
index 0000000..62799c2
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/EnvironmentMapping/Snow.dds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/EnvironmentMapping/Sphere.3ds b/third_party/gles2_book/Chapter_13/EnvironmentMapping/Sphere.3ds
new file mode 100644
index 0000000..108b93d
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/EnvironmentMapping/Sphere.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/EnvironmentMapping/Teapot.3ds b/third_party/gles2_book/Chapter_13/EnvironmentMapping/Teapot.3ds
new file mode 100644
index 0000000..78be5fb
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/EnvironmentMapping/Teapot.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/Noise3D/Noise3D.rfx b/third_party/gles2_book/Chapter_13/Noise3D/Noise3D.rfx
new file mode 100644
index 0000000..b6663d1
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/Noise3D/Noise3D.rfx
@@ -0,0 +1,1171 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE RENDER_MONKEY [
+ <!ELEMENT RENDER_MONKEY
+ (
+ RmEffectWorkspace |
+ RmRegistryBranch |
+ RmClipboardNode
+ )?>
+
+ <!ELEMENT RmEffectWorkspace
+ (
+ RmRegistryBranch?,
+ RmPlugInData?,
+ RmStringVariable*,
+ (
+ ( RmDirectXEffect, RmOpenGLEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLEffect, RmDirectXEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLESEffect, RmDirectXEffect?, RmOpenGLEffect? )
+ )?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmEffectGroup
+ )*
+ )>
+
+ <!ELEMENT RmEffectGroup
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData
+ )*
+ )>
+
+ <!ELEMENT RmDirectXEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLESEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLESPass
+ )*
+ )>
+
+ <!ELEMENT RmPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ (
+ ( RmHLSLShader | RmShader ),
+ ( RmShader | RmHLSLShader )?
+ )
+ )?,
+ RmRenderTarget*,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject
+ )*
+ )>
+
+ <!ELEMENT RmGLPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLShader, RmGLShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLESPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLESShader, RmGLESShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant
+ )*
+ )>
+
+ <!ELEMENT RmHLSLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmGLESShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmTextureObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmTextureReference?,
+ RmState*
+ )>
+
+ <!ELEMENT RmLightObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmLightReference?
+ )>
+
+ <!ELEMENT RmMaterialObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmMaterialReference?
+ )>
+
+ <!ELEMENT RmRenderStateBlock
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmState
+ )*
+ )>
+
+ <!ELEMENT RmStreamMap
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmStream
+ )*
+ )>
+
+ <!ELEMENT RmStream ( RmPlugInData?, RmStreamChannel* )>
+
+ <!ELEMENT RmModelData ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmTextureReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmLightReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmMaterialReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmCameraReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmModelReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmStreamMapReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderableTexture ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderTarget ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmBooleanVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmFloatVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmVectorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMatrixVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmColorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmIntegerVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm2DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCubemapVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm3DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmLightVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMaterialVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCamera ( RmPlugInData?, RmStringVariable* )>
+
+ <!ELEMENT RmStringVariable ( RmTextDataBlock, RmPlugInData? )>
+
+ <!ELEMENT RmDynamicVariable
+ (
+ RmDynamicVariableValueContainer,
+ RmPlugInData?,
+ RmStringVariable?
+ )>
+
+ <!ELEMENT RmDynamicVariableValueContainer
+ (
+ RmPlugInData?,
+ RmDynamicVariableValue*
+ )>
+
+ <!ELEMENT RmTextDataBlock ( #PCDATA ) >
+
+ <!ELEMENT RmRegistryBranch
+ (
+ RmTextDataBlock?,
+ (
+ RmRegistryBranch |
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable
+ )*
+ )>
+
+ <!ELEMENT RmPlugInData
+ (
+ RmTextDataBlock?,
+ (
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable
+ )*
+ )>
+
+ <!ELEMENT RmClipboardNode
+ (
+ RmTextDataBlock?,
+ (
+ RmEffectWorkspace |
+ RmEffectGroup |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmPass |
+ RmGLPass |
+ RmGLESPass |
+ RmShader |
+ RmHLSLShader |
+ RmGLShader |
+ RmGLESShader |
+ RmShaderConstant |
+ RmSampler |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmRenderStateBlock |
+ RmState |
+ RmStreamMap |
+ RmStream |
+ RmStreamChannel |
+ RmModelData |
+ RmTextureReference |
+ RmLightReference |
+ RmMaterialReference |
+ RmModelReference |
+ RmStreamMapReference |
+ RmRenderableTexture |
+ RmRenderTarget |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmDynamicVariableValue |
+ RmColorVariable |
+ RmIntegerVariable |
+ RmStringVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRegistryBranch |
+ RmPlugInData |
+ RmCamera |
+ RmCameraReference
+ )*
+ )>
+
+ <!ELEMENT RmStreamChannel ( RmPlugInData? ) >
+ <!ELEMENT RmShaderConstant ( RmPlugInData? ) >
+ <!ELEMENT RmSampler ( RmPlugInData? ) >
+ <!ELEMENT RmState ( RmPlugInData? ) >
+ <!ELEMENT RmDynamicVariableValue ( RmPlugInData? ) >
+
+ <!ELEMENT RmShaderCode ( #PCDATA ) >
+
+ <!ATTLIST RmEffectWorkspace
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_EFFECT CDATA #REQUIRED
+ VALIDATION_STRING CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmEffectGroup
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDirectXEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLESEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmHLSLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ TARGET CDATA #REQUIRED
+ ENTRY_POINT CDATA #REQUIRED
+ COMPILER_FLAGS CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmGLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderConstant
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmSampler
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE_INDEX CDATA #REQUIRED
+ VERTEX_TEXTURE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmLightObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderStateBlock
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmState
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMap
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStream
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STRIDE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamChannel
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ DATA_SIZE CDATA #REQUIRED
+ DATA_TYPE CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ USAGE_INDEX CDATA #REQUIRED
+ ATTRIBUTE_NAME CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIENTATION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMapReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderableTexture
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ WIDTH CDATA #REQUIRED
+ HEIGHT CDATA #REQUIRED
+ FORMAT CDATA #REQUIRED
+ USE_VIEWPORT_DIMENSIONS ( TRUE | FALSE ) #REQUIRED
+ GENERATE_MIPMAPS ( TRUE | FALSE ) #REQUIRED
+ WIDTH_RATIO CDATA #REQUIRED
+ HEIGHT_RATIO CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderTarget
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ RENDER_TO_SCREEN ( TRUE | FALSE ) #REQUIRED
+ COLOR_CLEAR ( TRUE | FALSE ) #REQUIRED
+ DEPTH_CLEAR ( TRUE | FALSE ) #REQUIRED
+ CLEAR_COLOR_VALUE CDATA #REQUIRED
+ DEPTH_CLEAR_VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmBooleanVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmFloatVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmVectorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmMatrixVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ VALUE_4 CDATA #REQUIRED
+ VALUE_5 CDATA #REQUIRED
+ VALUE_6 CDATA #REQUIRED
+ VALUE_7 CDATA #REQUIRED
+ VALUE_8 CDATA #REQUIRED
+ VALUE_9 CDATA #REQUIRED
+ VALUE_10 CDATA #REQUIRED
+ VALUE_11 CDATA #REQUIRED
+ VALUE_12 CDATA #REQUIRED
+ VALUE_13 CDATA #REQUIRED
+ VALUE_14 CDATA #REQUIRED
+ VALUE_15 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VARIABLE_TYPE ( FLOAT | INTEGER | BOOLEAN ) #REQUIRED
+ ROWS CDATA #REQUIRED
+ COLUMNS CDATA #REQUIRED
+ FIXED_SIZE ( TRUE | FALSE ) #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariableValue
+ ROW_INDEX CDATA #REQUIRED
+ COLUMN_INDEX CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmColorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmIntegerVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmStringVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm2DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCubemapVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm3DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ LIGHT_ENABLED ( TRUE | FALSE ) #REQUIRED
+ LIGHT_TYPE ( POSITIONAL | DIRECTIONAL | SPOTLIGHT ) #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ POSITION_0 CDATA #REQUIRED
+ POSITION_1 CDATA #REQUIRED
+ POSITION_2 CDATA #REQUIRED
+ DIRECTION_0 CDATA #REQUIRED
+ DIRECTION_1 CDATA #REQUIRED
+ DIRECTION_2 CDATA #REQUIRED
+ ATTENUATION_0 CDATA #REQUIRED
+ ATTENUATION_1 CDATA #REQUIRED
+ ATTENUATION_2 CDATA #REQUIRED
+ SPOTLIGHT_THETA CDATA #REQUIRED
+ SPOTLIGHT_PHI CDATA #REQUIRED
+ RANGE CDATA #REQUIRED
+ FALLOFF CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ EMISSIVE_0 CDATA #REQUIRED
+ EMISSIVE_1 CDATA #REQUIRED
+ EMISSIVE_2 CDATA #REQUIRED
+ EMISSIVE_3 CDATA #REQUIRED
+ SPECULAR_POWER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRegistryBranch
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPlugInData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PLUGIN_GUID CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmClipboardNode
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCamera
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ CAMERA_POSITION_X CDATA #REQUIRED
+ CAMERA_POSITION_Y CDATA #REQUIRED
+ CAMERA_POSITION_Z CDATA #REQUIRED
+ LOOK_AT_VECTOR_X CDATA #REQUIRED
+ LOOK_AT_VECTOR_Y CDATA #REQUIRED
+ LOOK_AT_VECTOR_Z CDATA #REQUIRED
+ UP_VECTOR_X CDATA #REQUIRED
+ UP_VECTOR_Y CDATA #REQUIRED
+ UP_VECTOR_Z CDATA #REQUIRED
+ FOV CDATA #REQUIRED
+ NEAR_CLIP_PLANE CDATA #REQUIRED
+ FAR_CLIP_PLANE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCameraReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ USE_ACTIVE_CAMERA ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderCode
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+ <!ATTLIST RmTextDataBlock
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+]>
+<RENDER_MONKEY>
+ <RmEffectWorkspace NAME="Effect Workspace" API="" ACTIVE_EFFECT="Effect Workspace.Textured" VALIDATION_STRING="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_REGISTRY" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_LOCAL" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_PLUGIN" API="" XML_VERSION="RenderMonkey 1.71"><RmTextDataBlock TYPE="TEXT"><![CDATA[
+<DockingPaneLayouts><Application_Layout><Pane-1><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Artist Editor</Title><ID>1001</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>12</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>12</LastHolder></Pane-1><Pane-2><Type>0</Type><DockingCX>254</DockingCX><DockingCY>374</DockingCY><Title>u_fogColor</Title><ID>1100</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>6</DockingHolder><FloatingHolder>17</FloatingHolder><LastHolder>17</LastHolder></Pane-2><Pane-3><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>1</Horiz><Pane-1>4</Pane-1><Pane-2>5</Pane-2><Pane-3>6</Pane-3><Pane-4>7</Pane-4><Panes>4</Panes></Pane-3><Pane-4><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-4><Pane-5><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-5><Pane-6><Type>1</Type><DockingCX>254</DockingCX><DockingCY>374</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-6><Pane-7><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>0</Horiz><Pane-1>8</Pane-1><Pane-2>13</Pane-2><Panes>2</Panes></Pane-7><Pane-8><Type>2</Type><DockingCX>0</DockingCX><DockingCY>641</DockingCY><Horiz>1</Horiz><Pane-1>9</Pane-1><Pane-2>11</Pane-2><Pane-3>12</Pane-3><Panes>3</Panes></Pane-8><Pane-9><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>10</Selected><Panes>1</Panes><Pane-1>10</Pane-1></Pane-9><Pane-10><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Workspace</Title><ID>1000</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>9</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>9</LastHolder></Pane-10><Pane-11><Type>4</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY></Pane-11><Pane-12><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-12><Pane-13><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>14</Selected><Panes>1</Panes><Pane-1>14</Pane-1></Pane-13><Pane-14><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Output</Title><ID>1002</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>13</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>13</LastHolder></Pane-14><Pane-15><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>16</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>406</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>254</WindowRectRightPos></Pane-15><Pane-16><Type>2</Type><DockingCX>254</DockingCX><DockingCY>374</DockingCY><Horiz>1</Horiz><Pane-1>17</Pane-1><Panes>1</Panes></Pane-16><Pane-17><Type>1</Type><DockingCX>254</DockingCX><DockingCY>374</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-17><Pane-18><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_fogMaxDist</Title><ID>1101</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>5</DockingHolder><FloatingHolder>21</FloatingHolder><LastHolder>21</LastHolder></Pane-18><Pane-19><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>20</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-19><Pane-20><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>21</Pane-1><Panes>1</Panes></Pane-20><Pane-21><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-21><Pane-22><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_fogMinDist</Title><ID>1102</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>4</DockingHolder><FloatingHolder>25</FloatingHolder><LastHolder>25</LastHolder></Pane-22><Pane-23><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>24</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-23><Pane-24><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>25</Pane-1><Panes>1</Panes></Pane-24><Pane-25><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-25><Summary><TopContainer>3</TopContainer><Client>11</Client><Panes>25</Panes></Summary></Application_Layout></DockingPaneLayouts>
+]]></RmTextDataBlock>
+ <RmRegistryBranch NAME="RmColorEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured.u_fogColor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1100" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="FloatingPoint" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="FALSE"/>
+ <RmIntegerVariable NAME="ColorType" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="LargeSize" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="TRUE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmScalarEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured.u_fogMaxDist" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1101" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="Effect Workspace.Textured.u_fogMinDist" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1102" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderStateBlockEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="340" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="143" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1283" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="434" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewDx9Window" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLESWindow" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLWindow" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EffectPlacementRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="528" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="512" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewGLPreview" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmLightEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NoteEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderableTextureEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderTargetEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmShaderEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Fragment Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Terrain]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-19" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="382" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="81" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="105" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1283" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="434" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureGenerator" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmStreamEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured.Stream Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="258" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="128" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="851" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="270" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+20/1/2008 12:42:24]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey Version 1.80 (build 125)]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="XML_VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey 1.71]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="BASE_WORKSPACE_PATH" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+D:\svn\redbook\Code\Chapter_13\Noise3D\]]></RmTextDataBlock></RmStringVariable>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmOpenGLESEffect NAME="Textured" API="OpenGL ES" ACTIVE_CAMERA="Camera">
+ <RmCamera NAME="Camera" API="" CAMERA_POSITION_X="-80.307373" CAMERA_POSITION_Y="12.115058" CAMERA_POSITION_Z="-182.767441" LOOK_AT_VECTOR_X="0.000000" LOOK_AT_VECTOR_Y="0.000000" LOOK_AT_VECTOR_Z="0.000000" UP_VECTOR_X="-0.012923" UP_VECTOR_Y="0.997336" UP_VECTOR_Z="0.071790" FOV="45.000000" NEAR_CLIP_PLANE="1.000000" FAR_CLIP_PLANE="1000.000000"/>
+ <RmFloatVariable NAME="u_fogMinDist" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-200.000000" MIN="-1.000000" MAX="0.000000" CLAMP="FALSE"/>
+ <RmFloatVariable NAME="u_fogMaxDist" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="500.000000" MIN="-1.000000" MAX="1.000000" CLAMP="FALSE"/>
+ <RmVectorVariable NAME="u_eyePos" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewPosition" VALUE_0="-80.307373" VALUE_1="12.115058" VALUE_2="-182.767441" VALUE_3="1.000000" MIN="-10.000000" MAX="10.000000" CLAMP="FALSE" NORMALIZE="FALSE"/>
+ <RmMatrixVariable NAME="u_matView" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="View" VALUE_0="-0.915752" VALUE_1="-0.040636" VALUE_2="0.399684" VALUE_3="-0.000002" VALUE_4="-0.012923" VALUE_5="0.997336" VALUE_6="0.071790" VALUE_7="0.000279" VALUE_8="-0.401537" VALUE_9="0.060575" VALUE_10="-0.913837" VALUE_11="-199.999985" VALUE_12="0.000000" VALUE_13="0.000000" VALUE_14="0.000000" VALUE_15="1.000000"/>
+ <RmMatrixVariable NAME="u_matViewProjection" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="-2.005162" VALUE_1="-0.088978" VALUE_2="0.875163" VALUE_3="-0.000005" VALUE_4="-0.031199" VALUE_5="2.407782" VALUE_6="0.173316" VALUE_7="0.000675" VALUE_8="0.401939" VALUE_9="-0.060636" VALUE_10="0.914752" VALUE_11="199.199188" VALUE_12="0.401537" VALUE_13="-0.060575" VALUE_14="0.913837" VALUE_15="199.999985"/>
+ <RmFloatVariable NAME="u_time" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="Time0_X" VALUE="100.126518" MIN="-1.000000" MAX="1.000000" CLAMP="FALSE"/>
+ <RmColorVariable NAME="u_fogColor" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="1.000000" VALUE_1="1.000000" VALUE_2="1.000000" VALUE_3="0.000000"/>
+ <Rm2DTextureVariable NAME="base" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" FILE_NAME="Terrain.tga" ORIGIN="0"/>
+ <Rm3DTextureVariable NAME="NoiseVolume" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" FILE_NAME="NoiseVolume.dds" ORIGIN="0"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="20">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="a_vertex"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="a_texCoord"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="Model" API="" FILE_NAME=".\Terrain.3ds" ORIENTATION="0"/>
+ <RmModelData NAME="SkyDome" API="" FILE_NAME=".\SkyDome.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Sky" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="SkyDome" API=""/>
+ <RmRenderStateBlock NAME="Render State" API="OpenGL ES">
+ <RmState NAME="GL_FrontFace" API="OpenGL ES" STATE="7" VALUE="2" USAGE="RENDER_STATE"/>
+ </RmRenderStateBlock>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform mat4 u_matViewProjection;
+attribute vec4 a_vertex;
+void main(void)
+{
+ gl_Position = u_matViewProjection * a_vertex;
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+#ifdef GL_FRAGMENT_PRECISION_HIGH
+ // Default precision
+ precision highp float;
+#else
+ precision mediump float;
+#endif
+
+uniform vec4 u_fogColor;
+
+void main(void)
+{
+ gl_FragColor = u_fogColor;
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmShaderConstant NAME="u_fogColor" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matViewProjection" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ <RmGLESPass NAME="Terrain" API="OpenGL ES" PASS_INDEX="1" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="Model" API=""/>
+ <RmRenderStateBlock NAME="Render State" API="OpenGL ES">
+ <RmState NAME="GL_FrontFace" API="OpenGL ES" STATE="7" VALUE="1" USAGE="RENDER_STATE"/>
+ </RmRenderStateBlock>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform mat4 u_matViewProjection;
+uniform mat4 u_matView;
+uniform vec4 u_eyePos;
+
+attribute vec4 a_vertex;
+attribute vec2 a_texCoord;
+
+varying vec2 v_texCoord;
+varying float v_eyeDist;
+
+void main( void )
+{
+ // Transform vertex to view-space
+ vec4 vViewPos = u_matView * a_vertex;
+
+ // Compute the distance to eye
+ v_eyeDist = sqrt( (vViewPos.x - u_eyePos.x) *
+ (vViewPos.x - u_eyePos.x) +
+ (vViewPos.y - u_eyePos.y) *
+ (vViewPos.y - u_eyePos.y) +
+ (vViewPos.z - u_eyePos.z) *
+ (vViewPos.z - u_eyePos.z) );
+
+ gl_Position = u_matViewProjection * a_vertex;
+ v_texCoord = a_texCoord.xy;
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+#extension GL_OES_texture_3D : enable
+precision mediump float;
+
+uniform vec4 u_fogColor;
+uniform float u_fogMaxDist;
+uniform float u_fogMinDist;
+uniform float u_time;
+uniform sampler2D baseMap;
+uniform sampler3D noiseVolume;
+
+varying vec2 v_texCoord;
+varying float v_eyeDist;
+
+float computeLinearFogFactor()
+{
+ float factor;
+
+ // Compute linear fog equation
+ factor = (u_fogMaxDist - v_eyeDist) /
+ (u_fogMaxDist - u_fogMinDist );
+
+ return factor;
+}
+
+void main( void )
+{
+ float fogFactor = computeLinearFogFactor();
+ vec4 baseColor = texture2D( baseMap, v_texCoord );
+
+ // Distort fog factor by noise
+ vec3 noiseCoord;
+ noiseCoord.xy = v_texCoord.xy - ( u_time * 0.1 );
+ noiseCoord.z = u_time * 0.1;
+
+ fogFactor += texture3D( noiseVolume, noiseCoord ).r;
+ fogFactor = clamp ( fogFactor, 0.0, 1.0 );
+
+ // Compute final color as a lerp with fog factor
+ gl_FragColor = baseColor * fogFactor +
+ u_fogColor * (1.0 - fogFactor);
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="baseMap" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="base" API=""/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="6" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmTextureObject NAME="noiseVolume" API="OpenGL ES" STATE_INDEX="1" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="NoiseVolume" API=""/>
+ </RmTextureObject>
+ <RmSampler NAME="baseMap" API="" REGISTER="-1"/>
+ <RmSampler NAME="noiseVolume" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_fogMaxDist" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_fogMinDist" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matView" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matViewProjection" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_time" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_eyePos" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_fogColor" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ </RmEffectWorkspace>
+</RENDER_MONKEY>
diff --git a/third_party/gles2_book/Chapter_13/Noise3D/NoiseVolume.dds b/third_party/gles2_book/Chapter_13/Noise3D/NoiseVolume.dds
new file mode 100644
index 0000000..bd8147d
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/Noise3D/NoiseVolume.dds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/Noise3D/SkyDome.3ds b/third_party/gles2_book/Chapter_13/Noise3D/SkyDome.3ds
new file mode 100644
index 0000000..5994396
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/Noise3D/SkyDome.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/Noise3D/Terrain.3ds b/third_party/gles2_book/Chapter_13/Noise3D/Terrain.3ds
new file mode 100644
index 0000000..a46d787
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/Noise3D/Terrain.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/Noise3D/Terrain.tga b/third_party/gles2_book/Chapter_13/Noise3D/Terrain.tga
new file mode 100644
index 0000000..47d5117
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/Noise3D/Terrain.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/Noise3D/generatenoise.c b/third_party/gles2_book/Chapter_13/Noise3D/generatenoise.c
new file mode 100644
index 0000000..a4c969b
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/Noise3D/generatenoise.c
@@ -0,0 +1,147 @@
+#include <stdlib.h>
+#include <math.h>
+
+// permTable describes a random permutatin of 8-bit values from 0 to 255.
+static unsigned char permTable[256] = {
+ 0xE1, 0x9B, 0xD2, 0x6C, 0xAF, 0xC7, 0xDD, 0x90, 0xCB, 0x74, 0x46, 0xD5, 0x45, 0x9E, 0x21, 0xFC,
+ 0x05, 0x52, 0xAD, 0x85, 0xDE, 0x8B, 0xAE, 0x1B, 0x09, 0x47, 0x5A, 0xF6, 0x4B, 0x82, 0x5B, 0xBF,
+ 0xA9, 0x8A, 0x02, 0x97, 0xC2, 0xEB, 0x51, 0x07, 0x19, 0x71, 0xE4, 0x9F, 0xCD, 0xFD, 0x86, 0x8E,
+ 0xF8, 0x41, 0xE0, 0xD9, 0x16, 0x79, 0xE5, 0x3F, 0x59, 0x67, 0x60, 0x68, 0x9C, 0x11, 0xC9, 0x81,
+ 0x24, 0x08, 0xA5, 0x6E, 0xED, 0x75, 0xE7, 0x38, 0x84, 0xD3, 0x98, 0x14, 0xB5, 0x6F, 0xEF, 0xDA,
+ 0xAA, 0xA3, 0x33, 0xAC, 0x9D, 0x2F, 0x50, 0xD4, 0xB0, 0xFA, 0x57, 0x31, 0x63, 0xF2, 0x88, 0xBD,
+ 0xA2, 0x73, 0x2C, 0x2B, 0x7C, 0x5E, 0x96, 0x10, 0x8D, 0xF7, 0x20, 0x0A, 0xC6, 0xDF, 0xFF, 0x48,
+ 0x35, 0x83, 0x54, 0x39, 0xDC, 0xC5, 0x3A, 0x32, 0xD0, 0x0B, 0xF1, 0x1C, 0x03, 0xC0, 0x3E, 0xCA,
+ 0x12, 0xD7, 0x99, 0x18, 0x4C, 0x29, 0x0F, 0xB3, 0x27, 0x2E, 0x37, 0x06, 0x80, 0xA7, 0x17, 0xBC,
+ 0x6A, 0x22, 0xBB, 0x8C, 0xA4, 0x49, 0x70, 0xB6, 0xF4, 0xC3, 0xE3, 0x0D, 0x23, 0x4D, 0xC4, 0xB9,
+ 0x1A, 0xC8, 0xE2, 0x77, 0x1F, 0x7B, 0xA8, 0x7D, 0xF9, 0x44, 0xB7, 0xE6, 0xB1, 0x87, 0xA0, 0xB4,
+ 0x0C, 0x01, 0xF3, 0x94, 0x66, 0xA6, 0x26, 0xEE, 0xFB, 0x25, 0xF0, 0x7E, 0x40, 0x4A, 0xA1, 0x28,
+ 0xB8, 0x95, 0xAB, 0xB2, 0x65, 0x42, 0x1D, 0x3B, 0x92, 0x3D, 0xFE, 0x6B, 0x2A, 0x56, 0x9A, 0x04,
+ 0xEC, 0xE8, 0x78, 0x15, 0xE9, 0xD1, 0x2D, 0x62, 0xC1, 0x72, 0x4E, 0x13, 0xCE, 0x0E, 0x76, 0x7F,
+ 0x30, 0x4F, 0x93, 0x55, 0x1E, 0xCF, 0xDB, 0x36, 0x58, 0xEA, 0xBE, 0x7A, 0x5F, 0x43, 0x8F, 0x6D,
+ 0x89, 0xD6, 0x91, 0x5D, 0x5C, 0x64, 0xF5, 0x00, 0xD8, 0xBA, 0x3C, 0x53, 0x69, 0x61, 0xCC, 0x34,
+ };
+
+#define NOISE_TABLE_MASK 255
+
+// lattice gradients 3D noise
+static float gradientTable[256*3];
+
+#define FLOOR(x) ((int)(x) - ((x) < 0 && (x) != (int)(x)))
+#define smoothstep(t) ( t * t * (3.0f - 2.0f * t) )
+#define lerp(t, a, b) ( a + t * (b - a) )
+
+void
+initNoiseTable()
+{
+ long rnd;
+ int i;
+ double a;
+ float x, y, z, r, theta;
+ float gradients[256*3];
+ unsigned int *p, *psrc;
+
+ srandom(0);
+
+ // build gradient table for 3D noise
+ for (i=0; i<256; i++)
+ {
+ /*
+ * calculate 1 - 2 * random number
+ */
+ rnd = random();
+ a = (random() & 0x7FFFFFFF) / (double) 0x7FFFFFFF;
+ z = (float)(1.0 - 2.0 * a);
+
+ r = (float)sqrt(1.0 - z * z); // r is radius of circle
+
+ rnd = random();
+ a = (float)((random() & 0x7FFFFFFF) / (double) 0x7FFFFFFF);
+ theta = (float)(2.0 * M_PI * a);
+ x = (float)(r * (float)cos(a));
+ y = (float)(r * (float)sin(a));
+
+ gradients[i*3] = x;
+ gradients[i*3+1] = y;
+ gradients[i*3+2] = z;
+ }
+
+ // use the index in the permutation table to load the
+ // gradient values from gradients to gradientTable
+ p = (unsigned int *)gradientTable;
+ psrc = (unsigned int *)gradients;
+ for (i=0; i<256; i++)
+ {
+ int indx = permTable[i];
+ p[i*3] = psrc[indx*3];
+ p[i*3+1] = psrc[indx*3+1];
+ p[i*3+2] = psrc[indx*3+2];
+ }
+}
+//
+// generate the value of gradient noise for a given lattice point
+//
+// (ix, iy, iz) specifies the 3D lattice position
+// (fx, fy, fz) specifies the fractional part
+//
+static float
+glattice3D(int ix, int iy, int iz, float fx, float fy, float fz)
+{
+ float *g;
+ int indx, y, z;
+
+ z = permTable[iz & NOISE_TABLE_MASK];
+ y = permTable[(iy + z) & NOISE_TABLE_MASK];
+ indx = (ix + y) & NOISE_TABLE_MASK;
+ g = &gradientTable[indx*3];
+
+ return (g[0]*fx + g[1]*fy + g[2]*fz);
+}
+
+//
+// generate the 3D noise value
+// f describes the input (x, y, z) position for which the noise value needs to be computed
+// noise3D returns the scalar noise value
+//
+float
+noise3D(float *f)
+{
+ int ix, iy, iz;
+ float fx0, fx1, fy0, fy1, fz0, fz1;
+ float wx, wy, wz;
+ float vx0, vx1, vy0, vy1, vz0, vz1;
+
+ ix = FLOOR(f[0]);
+ fx0 = f[0] - ix;
+ fx1 = fx0 - 1;
+ wx = smoothstep(fx0);
+
+ iy = FLOOR(f[1]);
+ fy0 = f[1] - iy;
+ fy1 = fy0 - 1;
+ wy = smoothstep(fy0);
+
+ iz = FLOOR(f[2]);
+ fz0 = f[2] - iz;
+ fz1 = fz0 - 1;
+ wz = smoothstep(fz0);
+
+ vx0 = glattice3D(ix, iy, iz, fx0, fy0, fz0);
+ vx1 = glattice3D(ix+1, iy, iz, fx1, fy0, fz0);
+ vy0 = lerp(wx, vx0, vx1);
+ vx0 = glattice3D(ix, iy+1, iz, fx0, fy1, fz0);
+ vx1 = glattice3D(ix+1, iy+1, iz, fx1, fy1, fz0);
+ vy1 = lerp(wx, vx0, vx1);
+ vz0 = lerp(wy, vy0, vy1);
+
+ vx0 = glattice3D(ix, iy, iz+1, fx0, fy0, fz1);
+ vx1 = glattice3D(ix+1, iy, iz+1, fx1, fy0, fz1);
+ vy0 = lerp(wx, vx0, vx1);
+ vx0 = glattice3D(ix, iy+1, iz+1, fx0, fy1, fz1);
+ vx1 = glattice3D(ix+1, iy+1, iz+1, fx1, fy1, fz1);
+ vy1 = lerp(wx, vx0, vx1);
+ vz1 = lerp(wy, vy0, vy1);
+
+ return lerp(wz, vz0, vz1);;
+}
+
+
diff --git a/third_party/gles2_book/Chapter_13/ParticleSystem/ParticleSystem.c b/third_party/gles2_book/Chapter_13/ParticleSystem/ParticleSystem.c
new file mode 100644
index 0000000..c6be9cf
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ParticleSystem/ParticleSystem.c
@@ -0,0 +1,294 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// ParticleSystem.c
+//
+// This is an example that demonstrates rendering a particle system
+// using a vertex shader and point sprites.
+//
+#include <stdlib.h>
+#include <math.h>
+#include "esUtil.h"
+
+#define NUM_PARTICLES 1000
+#define PARTICLE_SIZE 7
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+
+ // Attribute locations
+ GLint lifetimeLoc;
+ GLint startPositionLoc;
+ GLint endPositionLoc;
+
+ // Uniform location
+ GLint timeLoc;
+ GLint colorLoc;
+ GLint centerPositionLoc;
+ GLint samplerLoc;
+
+ // Texture handle
+ GLuint textureId;
+
+ // Particle vertex data
+ float particleData[ NUM_PARTICLES * PARTICLE_SIZE ];
+
+ // Current time
+ float time;
+
+} UserData;
+
+///
+// Load texture from disk
+//
+GLuint LoadTexture ( char *fileName )
+{
+ int width,
+ height;
+ char *buffer = esLoadTGA ( fileName, &width, &height );
+ GLuint texId;
+
+ if ( buffer == NULL )
+ {
+ esLogMessage ( "Error loading (%s) image.\n", fileName );
+ return 0;
+ }
+
+ glGenTextures ( 1, &texId );
+ glBindTexture ( GL_TEXTURE_2D, texId );
+
+ glTexImage2D ( GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, buffer );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
+
+ free ( buffer );
+
+ return texId;
+}
+
+
+///
+// Initialize the shader and program object
+//
+int Init ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+ int i;
+
+ GLbyte vShaderStr[] =
+ "uniform float u_time; \n"
+ "uniform vec3 u_centerPosition; \n"
+ "attribute float a_lifetime; \n"
+ "attribute vec3 a_startPosition; \n"
+ "attribute vec3 a_endPosition; \n"
+ "varying float v_lifetime; \n"
+ "void main() \n"
+ "{ \n"
+ " if ( u_time <= a_lifetime ) \n"
+ " { \n"
+ " gl_Position.xyz = a_startPosition + \n"
+ " (u_time * a_endPosition); \n"
+ " gl_Position.xyz += u_centerPosition; \n"
+ " gl_Position.w = 1.0; \n"
+ " } \n"
+ " else \n"
+ " gl_Position = vec4( -1000, -1000, 0, 0 ); \n"
+ " v_lifetime = 1.0 - ( u_time / a_lifetime ); \n"
+ " v_lifetime = clamp ( v_lifetime, 0.0, 1.0 ); \n"
+ " gl_PointSize = ( v_lifetime * v_lifetime ) * 40.0; \n"
+ "}";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float; \n"
+ "uniform vec4 u_color; \n"
+ "varying float v_lifetime; \n"
+ "uniform sampler2D s_texture; \n"
+ "void main() \n"
+ "{ \n"
+ " vec4 texColor; \n"
+ " texColor = texture2D( s_texture, gl_PointCoord ); \n"
+ " gl_FragColor = vec4( u_color ) * texColor; \n"
+ " gl_FragColor.a *= v_lifetime; \n"
+ "} \n";
+
+ // Load the shaders and get a linked program object
+ userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
+
+ // Get the attribute locations
+ userData->lifetimeLoc = glGetAttribLocation ( userData->programObject, "a_lifetime" );
+ userData->startPositionLoc = glGetAttribLocation ( userData->programObject, "a_startPosition" );
+ userData->endPositionLoc = glGetAttribLocation ( userData->programObject, "a_endPosition" );
+
+ // Get the uniform locations
+ userData->timeLoc = glGetUniformLocation ( userData->programObject, "u_time" );
+ userData->centerPositionLoc = glGetUniformLocation ( userData->programObject, "u_centerPosition" );
+ userData->colorLoc = glGetUniformLocation ( userData->programObject, "u_color" );
+ userData->samplerLoc = glGetUniformLocation ( userData->programObject, "s_texture" );
+
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+
+ // Fill in particle data array
+ srand ( 0 );
+ for ( i = 0; i < NUM_PARTICLES; i++ )
+ {
+ float *particleData = &userData->particleData[i * PARTICLE_SIZE];
+
+ // Lifetime of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 10000.0f );
+
+ // End position of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+ (*particleData++) = ( (float)(rand() % 10000) / 5000.0f ) - 1.0f;
+
+ // Start position of particle
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+ (*particleData++) = ( (float)(rand() % 10000) / 40000.0f ) - 0.125f;
+
+ }
+
+ // Initialize time to cause reset on first update
+ userData->time = 1.0f;
+
+ userData->textureId = LoadTexture ( "smoke.tga" );
+ if ( userData->textureId <= 0 )
+ {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+///
+// Update time-based variables
+//
+void Update ( ESContext *esContext, float deltaTime )
+{
+ UserData *userData = esContext->userData;
+
+ userData->time += deltaTime;
+
+ if ( userData->time >= 1.0f )
+ {
+ float centerPos[3];
+ float color[4];
+
+ userData->time = 0.0f;
+
+ // Pick a new start location and color
+ centerPos[0] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+ centerPos[1] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+ centerPos[2] = ( (float)(rand() % 10000) / 10000.0f ) - 0.5f;
+
+ glUniform3fv ( userData->centerPositionLoc, 1, &centerPos[0] );
+
+ // Random color
+ color[0] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[1] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[2] = ( (float)(rand() % 10000) / 20000.0f ) + 0.5f;
+ color[3] = 0.5;
+
+ glUniform4fv ( userData->colorLoc, 1, &color[0] );
+ }
+
+ // Load uniform time variable
+ glUniform1f ( userData->timeLoc, userData->time );
+}
+
+///
+// Draw a triangle using the shader pair created in Init()
+//
+void Draw ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+
+ // Set the viewport
+ glViewport ( 0, 0, esContext->width, esContext->height );
+
+ // Clear the color buffer
+ glClear ( GL_COLOR_BUFFER_BIT );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex attributes
+ glVertexAttribPointer ( userData->lifetimeLoc, 1, GL_FLOAT,
+ GL_FALSE, PARTICLE_SIZE * sizeof(GLfloat),
+ userData->particleData );
+
+ glVertexAttribPointer ( userData->endPositionLoc, 3, GL_FLOAT,
+ GL_FALSE, PARTICLE_SIZE * sizeof(GLfloat),
+ &userData->particleData[1] );
+
+ glVertexAttribPointer ( userData->startPositionLoc, 3, GL_FLOAT,
+ GL_FALSE, PARTICLE_SIZE * sizeof(GLfloat),
+ &userData->particleData[4] );
+
+
+ glEnableVertexAttribArray ( userData->lifetimeLoc );
+ glEnableVertexAttribArray ( userData->endPositionLoc );
+ glEnableVertexAttribArray ( userData->startPositionLoc );
+ // Blend particles
+ glEnable ( GL_BLEND );
+ glBlendFunc ( GL_SRC_ALPHA, GL_ONE );
+
+ // Bind the texture
+ glActiveTexture ( GL_TEXTURE0 );
+ glBindTexture ( GL_TEXTURE_2D, userData->textureId );
+ glEnable ( GL_TEXTURE_2D );
+
+ // Set the sampler texture unit to 0
+ glUniform1i ( userData->samplerLoc, 0 );
+
+ glDrawArrays( GL_POINTS, 0, NUM_PARTICLES );
+
+ eglSwapBuffers ( esContext->eglDisplay, esContext->eglSurface );
+}
+
+///
+// Cleanup
+//
+void ShutDown ( ESContext *esContext )
+{
+ UserData *userData = esContext->userData;
+
+ // Delete texture object
+ glDeleteTextures ( 1, &userData->textureId );
+
+ // Delete program object
+ glDeleteProgram ( userData->programObject );
+}
+
+
+int main ( int argc, char *argv[] )
+{
+ ESContext esContext;
+ UserData userData;
+
+ esInitContext ( &esContext );
+ esContext.userData = &userData;
+
+ esCreateWindow ( &esContext, "ParticleSystem", 640, 480, ES_WINDOW_RGB );
+
+ if ( !Init ( &esContext ) )
+ return 0;
+
+ esRegisterDrawFunc ( &esContext, Draw );
+ esRegisterUpdateFunc ( &esContext, Update );
+
+ esMainLoop ( &esContext );
+
+ ShutDown ( &esContext );
+}
diff --git a/third_party/gles2_book/Chapter_13/ParticleSystem/smoke.tga b/third_party/gles2_book/Chapter_13/ParticleSystem/smoke.tga
new file mode 100644
index 0000000..06a0705
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ParticleSystem/smoke.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/PerFragmentLighting/Fieldstone.tga b/third_party/gles2_book/Chapter_13/PerFragmentLighting/Fieldstone.tga
new file mode 100644
index 0000000..8acafae
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/PerFragmentLighting/Fieldstone.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/PerFragmentLighting/FieldstoneBumpDOT3.tga b/third_party/gles2_book/Chapter_13/PerFragmentLighting/FieldstoneBumpDOT3.tga
new file mode 100644
index 0000000..6290f52
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/PerFragmentLighting/FieldstoneBumpDOT3.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/PerFragmentLighting/PerFragmentLighting.rfx b/third_party/gles2_book/Chapter_13/PerFragmentLighting/PerFragmentLighting.rfx
new file mode 100644
index 0000000..58c3b9f
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/PerFragmentLighting/PerFragmentLighting.rfx
@@ -0,0 +1,1137 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE RENDER_MONKEY [
+ <!ELEMENT RENDER_MONKEY
+ (
+ RmEffectWorkspace |
+ RmRegistryBranch |
+ RmClipboardNode
+ )?>
+
+ <!ELEMENT RmEffectWorkspace
+ (
+ RmRegistryBranch?,
+ RmPlugInData?,
+ RmStringVariable*,
+ (
+ ( RmDirectXEffect, RmOpenGLEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLEffect, RmDirectXEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLESEffect, RmDirectXEffect?, RmOpenGLEffect? )
+ )?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmEffectGroup
+ )*
+ )>
+
+ <!ELEMENT RmEffectGroup
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData
+ )*
+ )>
+
+ <!ELEMENT RmDirectXEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLESEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLESPass
+ )*
+ )>
+
+ <!ELEMENT RmPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ (
+ ( RmHLSLShader | RmShader ),
+ ( RmShader | RmHLSLShader )?
+ )
+ )?,
+ RmRenderTarget*,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject
+ )*
+ )>
+
+ <!ELEMENT RmGLPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLShader, RmGLShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLESPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLESShader, RmGLESShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant
+ )*
+ )>
+
+ <!ELEMENT RmHLSLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmGLESShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmTextureObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmTextureReference?,
+ RmState*
+ )>
+
+ <!ELEMENT RmLightObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmLightReference?
+ )>
+
+ <!ELEMENT RmMaterialObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmMaterialReference?
+ )>
+
+ <!ELEMENT RmRenderStateBlock
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmState
+ )*
+ )>
+
+ <!ELEMENT RmStreamMap
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmStream
+ )*
+ )>
+
+ <!ELEMENT RmStream ( RmPlugInData?, RmStreamChannel* )>
+
+ <!ELEMENT RmModelData ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmTextureReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmLightReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmMaterialReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmCameraReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmModelReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmStreamMapReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderableTexture ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderTarget ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmBooleanVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmFloatVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmVectorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMatrixVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmColorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmIntegerVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm2DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCubemapVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm3DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmLightVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMaterialVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCamera ( RmPlugInData?, RmStringVariable* )>
+
+ <!ELEMENT RmStringVariable ( RmTextDataBlock, RmPlugInData? )>
+
+ <!ELEMENT RmDynamicVariable
+ (
+ RmDynamicVariableValueContainer,
+ RmPlugInData?,
+ RmStringVariable?
+ )>
+
+ <!ELEMENT RmDynamicVariableValueContainer
+ (
+ RmPlugInData?,
+ RmDynamicVariableValue*
+ )>
+
+ <!ELEMENT RmTextDataBlock ( #PCDATA ) >
+
+ <!ELEMENT RmRegistryBranch
+ (
+ RmTextDataBlock?,
+ (
+ RmRegistryBranch |
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable
+ )*
+ )>
+
+ <!ELEMENT RmPlugInData
+ (
+ RmTextDataBlock?,
+ (
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable
+ )*
+ )>
+
+ <!ELEMENT RmClipboardNode
+ (
+ RmTextDataBlock?,
+ (
+ RmEffectWorkspace |
+ RmEffectGroup |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmPass |
+ RmGLPass |
+ RmGLESPass |
+ RmShader |
+ RmHLSLShader |
+ RmGLShader |
+ RmGLESShader |
+ RmShaderConstant |
+ RmSampler |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmRenderStateBlock |
+ RmState |
+ RmStreamMap |
+ RmStream |
+ RmStreamChannel |
+ RmModelData |
+ RmTextureReference |
+ RmLightReference |
+ RmMaterialReference |
+ RmModelReference |
+ RmStreamMapReference |
+ RmRenderableTexture |
+ RmRenderTarget |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmDynamicVariableValue |
+ RmColorVariable |
+ RmIntegerVariable |
+ RmStringVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRegistryBranch |
+ RmPlugInData |
+ RmCamera |
+ RmCameraReference
+ )*
+ )>
+
+ <!ELEMENT RmStreamChannel ( RmPlugInData? ) >
+ <!ELEMENT RmShaderConstant ( RmPlugInData? ) >
+ <!ELEMENT RmSampler ( RmPlugInData? ) >
+ <!ELEMENT RmState ( RmPlugInData? ) >
+ <!ELEMENT RmDynamicVariableValue ( RmPlugInData? ) >
+
+ <!ELEMENT RmShaderCode ( #PCDATA ) >
+
+ <!ATTLIST RmEffectWorkspace
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_EFFECT CDATA #REQUIRED
+ VALIDATION_STRING CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmEffectGroup
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDirectXEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLESEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmHLSLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ TARGET CDATA #REQUIRED
+ ENTRY_POINT CDATA #REQUIRED
+ COMPILER_FLAGS CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmGLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderConstant
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmSampler
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE_INDEX CDATA #REQUIRED
+ VERTEX_TEXTURE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmLightObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderStateBlock
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmState
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMap
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStream
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STRIDE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamChannel
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ DATA_SIZE CDATA #REQUIRED
+ DATA_TYPE CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ USAGE_INDEX CDATA #REQUIRED
+ ATTRIBUTE_NAME CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIENTATION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMapReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderableTexture
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ WIDTH CDATA #REQUIRED
+ HEIGHT CDATA #REQUIRED
+ FORMAT CDATA #REQUIRED
+ USE_VIEWPORT_DIMENSIONS ( TRUE | FALSE ) #REQUIRED
+ GENERATE_MIPMAPS ( TRUE | FALSE ) #REQUIRED
+ WIDTH_RATIO CDATA #REQUIRED
+ HEIGHT_RATIO CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderTarget
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ RENDER_TO_SCREEN ( TRUE | FALSE ) #REQUIRED
+ COLOR_CLEAR ( TRUE | FALSE ) #REQUIRED
+ DEPTH_CLEAR ( TRUE | FALSE ) #REQUIRED
+ CLEAR_COLOR_VALUE CDATA #REQUIRED
+ DEPTH_CLEAR_VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmBooleanVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmFloatVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmVectorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmMatrixVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ VALUE_4 CDATA #REQUIRED
+ VALUE_5 CDATA #REQUIRED
+ VALUE_6 CDATA #REQUIRED
+ VALUE_7 CDATA #REQUIRED
+ VALUE_8 CDATA #REQUIRED
+ VALUE_9 CDATA #REQUIRED
+ VALUE_10 CDATA #REQUIRED
+ VALUE_11 CDATA #REQUIRED
+ VALUE_12 CDATA #REQUIRED
+ VALUE_13 CDATA #REQUIRED
+ VALUE_14 CDATA #REQUIRED
+ VALUE_15 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VARIABLE_TYPE ( FLOAT | INTEGER | BOOLEAN ) #REQUIRED
+ ROWS CDATA #REQUIRED
+ COLUMNS CDATA #REQUIRED
+ FIXED_SIZE ( TRUE | FALSE ) #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariableValue
+ ROW_INDEX CDATA #REQUIRED
+ COLUMN_INDEX CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmColorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmIntegerVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmStringVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm2DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCubemapVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm3DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ LIGHT_ENABLED ( TRUE | FALSE ) #REQUIRED
+ LIGHT_TYPE ( POSITIONAL | DIRECTIONAL | SPOTLIGHT ) #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ POSITION_0 CDATA #REQUIRED
+ POSITION_1 CDATA #REQUIRED
+ POSITION_2 CDATA #REQUIRED
+ DIRECTION_0 CDATA #REQUIRED
+ DIRECTION_1 CDATA #REQUIRED
+ DIRECTION_2 CDATA #REQUIRED
+ ATTENUATION_0 CDATA #REQUIRED
+ ATTENUATION_1 CDATA #REQUIRED
+ ATTENUATION_2 CDATA #REQUIRED
+ SPOTLIGHT_THETA CDATA #REQUIRED
+ SPOTLIGHT_PHI CDATA #REQUIRED
+ RANGE CDATA #REQUIRED
+ FALLOFF CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ EMISSIVE_0 CDATA #REQUIRED
+ EMISSIVE_1 CDATA #REQUIRED
+ EMISSIVE_2 CDATA #REQUIRED
+ EMISSIVE_3 CDATA #REQUIRED
+ SPECULAR_POWER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRegistryBranch
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPlugInData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PLUGIN_GUID CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmClipboardNode
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCamera
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ CAMERA_POSITION_X CDATA #REQUIRED
+ CAMERA_POSITION_Y CDATA #REQUIRED
+ CAMERA_POSITION_Z CDATA #REQUIRED
+ LOOK_AT_VECTOR_X CDATA #REQUIRED
+ LOOK_AT_VECTOR_Y CDATA #REQUIRED
+ LOOK_AT_VECTOR_Z CDATA #REQUIRED
+ UP_VECTOR_X CDATA #REQUIRED
+ UP_VECTOR_Y CDATA #REQUIRED
+ UP_VECTOR_Z CDATA #REQUIRED
+ FOV CDATA #REQUIRED
+ NEAR_CLIP_PLANE CDATA #REQUIRED
+ FAR_CLIP_PLANE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCameraReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ USE_ACTIVE_CAMERA ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderCode
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+ <!ATTLIST RmTextDataBlock
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+]>
+<RENDER_MONKEY>
+ <RmEffectWorkspace NAME="Effect Workspace" API="" ACTIVE_EFFECT="Effect Workspace.Textured Bump" VALIDATION_STRING="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_REGISTRY" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_LOCAL" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_PLUGIN" API="" XML_VERSION="RenderMonkey 1.71"><RmTextDataBlock TYPE="TEXT"><![CDATA[
+<DockingPaneLayouts><Application_Layout><Pane-1><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Artist Editor</Title><ID>1001</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>8</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>8</LastHolder></Pane-1><Pane-2><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>1</Horiz><Pane-1>3</Pane-1><Panes>1</Panes></Pane-2><Pane-3><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>0</Horiz><Pane-1>4</Pane-1><Pane-2>9</Pane-2><Panes>2</Panes></Pane-3><Pane-4><Type>2</Type><DockingCX>0</DockingCX><DockingCY>791</DockingCY><Horiz>1</Horiz><Pane-1>5</Pane-1><Pane-2>7</Pane-2><Pane-3>8</Pane-3><Panes>3</Panes></Pane-4><Pane-5><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>6</Selected><Panes>1</Panes><Pane-1>6</Pane-1></Pane-5><Pane-6><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Workspace</Title><ID>1000</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>5</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>5</LastHolder></Pane-6><Pane-7><Type>4</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY></Pane-7><Pane-8><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-8><Pane-9><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>10</Selected><Panes>1</Panes><Pane-1>10</Pane-1></Pane-9><Pane-10><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Output</Title><ID>1002</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>9</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>9</LastHolder></Pane-10><Summary><TopContainer>2</TopContainer><Client>7</Client><Panes>10</Panes></Summary></Application_Layout></DockingPaneLayouts>
+]]></RmTextDataBlock>
+ <RmRegistryBranch NAME="RmPreviewGLWindow" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EffectPlacementRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured Bump" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="349" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmStreamEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured Bump.Stream Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="663" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="400" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="851" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="310" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewDx9Window" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLESWindow" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLPreview" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmLightEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NoteEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderableTextureEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderTargetEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmShaderEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured Bump" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Fragment Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Pass 0]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="32" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1014" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="43" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderStateBlockEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureGenerator" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+21/12/2007 14:16:11]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey Version 1.80 (build 125)]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="XML_VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey 1.71]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="BASE_WORKSPACE_PATH" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+D:\download\]]></RmTextDataBlock></RmStringVariable>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmOpenGLESEffect NAME="Textured Bump" API="OpenGL ES" ACTIVE_CAMERA="">
+ <RmFloatVariable NAME="u_specularPower" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE="25.000000" MIN="1.000000" MAX="100.000000" CLAMP="TRUE"/>
+ <RmDynamicVariable NAME="u_lightPosition" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VARIABLE_TYPE="FLOAT" ROWS="3" COLUMNS="1" FIXED_SIZE="TRUE" MIN="-100.000000" MAX="100.000000" CLAMP="TRUE" NORMALIZE="FALSE">
+ <RmDynamicVariableValueContainer>
+ <RmDynamicVariableValue ROW_INDEX="0" COLUMN_INDEX="0" VALUE="-100.000000"/>
+ <RmDynamicVariableValue ROW_INDEX="1" COLUMN_INDEX="0" VALUE="100.000000"/>
+ <RmDynamicVariableValue ROW_INDEX="2" COLUMN_INDEX="0" VALUE="100.000000"/>
+ </RmDynamicVariableValueContainer>
+ </RmDynamicVariable>
+ <RmDynamicVariable NAME="u_eyePosition" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VARIABLE_TYPE="FLOAT" ROWS="3" COLUMNS="1" FIXED_SIZE="TRUE" MIN="-100.000000" MAX="100.000000" CLAMP="TRUE" NORMALIZE="FALSE">
+ <RmDynamicVariableValueContainer>
+ <RmDynamicVariableValue ROW_INDEX="0" COLUMN_INDEX="0" VALUE="0.000000"/>
+ <RmDynamicVariableValue ROW_INDEX="1" COLUMN_INDEX="0" VALUE="0.000000"/>
+ <RmDynamicVariableValue ROW_INDEX="2" COLUMN_INDEX="0" VALUE="100.000000"/>
+ </RmDynamicVariableValueContainer>
+ </RmDynamicVariable>
+ <RmMatrixVariable NAME="u_matViewProjection" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="1.248492" VALUE_1="-0.144174" VALUE_2="1.796089" VALUE_3="-0.000000" VALUE_4="-0.822713" VALUE_5="2.144300" VALUE_6="0.744007" VALUE_7="-0.000062" VALUE_8="0.748748" VALUE_9="0.455184" VALUE_10="-0.483929" VALUE_11="199.199112" VALUE_12="0.747999" VALUE_13="0.454729" VALUE_14="-0.483445" VALUE_15="199.999908"/>
+ <RmMatrixVariable NAME="u_matViewInverse" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewInverse" VALUE_0="0.569533" VALUE_1="-0.340779" VALUE_2="-0.747999" VALUE_3="-149.599716" VALUE_4="-0.065769" VALUE_5="0.888198" VALUE_6="-0.454729" VALUE_7="-90.945732" VALUE_8="0.819333" VALUE_9="0.308178" VALUE_10="0.483445" VALUE_11="96.689011" VALUE_12="-0.000000" VALUE_13="-0.000000" VALUE_14="0.000000" VALUE_15="1.000000"/>
+ <RmColorVariable NAME="u_ambient" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="0.368627" VALUE_1="0.368421" VALUE_2="0.368421" VALUE_3="1.000000"/>
+ <RmColorVariable NAME="u_diffuse" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="0.886275" VALUE_1="0.885003" VALUE_2="0.885003" VALUE_3="1.000000"/>
+ <RmColorVariable NAME="u_specular" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="0.490196" VALUE_1="0.488722" VALUE_2="0.488722" VALUE_3="1.000000"/>
+ <Rm2DTextureVariable NAME="bump" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" FILE_NAME="FieldstoneBumpDOT3.tga" ORIGIN="0"/>
+ <Rm2DTextureVariable NAME="base" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" FILE_NAME="Fieldstone.tga" ORIGIN="0"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="56">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="a_vertex"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="a_texcoord0"/>
+ <RmStreamChannel NAME="Normal_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="3" USAGE_INDEX="0" ATTRIBUTE_NAME="a_normal"/>
+ <RmStreamChannel NAME="Binormal_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="7" USAGE_INDEX="0" ATTRIBUTE_NAME="a_binormal"/>
+ <RmStreamChannel NAME="Tangent_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="6" USAGE_INDEX="0" ATTRIBUTE_NAME="a_tangent"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="Model" API="" FILE_NAME=".\Torus.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Pass 0" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmModelReference NAME="Model" API=""/>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform mat4 u_matViewInverse;
+uniform mat4 u_matViewProjection;
+uniform vec3 u_lightPosition;
+uniform vec3 u_eyePosition;
+
+varying vec2 v_texcoord;
+varying vec3 v_viewDirection;
+varying vec3 v_lightDirection;
+
+attribute vec4 a_vertex;
+attribute vec2 a_texcoord0;
+attribute vec3 a_normal;
+attribute vec3 a_binormal;
+attribute vec3 a_tangent;
+
+void main( void )
+{
+ // Transform eye vector into world space
+ vec3 eyePositionWorld = (u_matViewInverse * vec4(u_eyePosition, 1.0)).xyz;
+
+ // Compute world-space direction vector
+ vec3 viewDirectionWorld = eyePositionWorld - a_vertex.xyz;
+
+ // Transform light position into world space
+ vec3 lightPositionWorld = (u_matViewInverse * vec4(u_lightPosition, 1.0)).xyz;
+
+ // Compute world-space light dirction vector
+ vec3 lightDirectionWorld = lightPositionWorld - a_vertex.xyz;
+
+ // Create the tangent matrix
+ mat3 tangentMat = mat3( a_tangent,
+ a_binormal,
+ a_normal );
+
+ // Transform the view and light vectors into tangent space
+ v_viewDirection = viewDirectionWorld * tangentMat;
+ v_lightDirection = lightDirectionWorld * tangentMat;
+
+ // Transform output position
+ gl_Position = u_matViewProjection * a_vertex;
+
+ // Pass through texture coordinate
+ v_texcoord = a_texcoord0.xy;
+
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+
+uniform vec4 u_ambient;
+uniform vec4 u_specular;
+uniform vec4 u_diffuse;
+uniform float u_specularPower;
+
+uniform sampler2D s_baseMap;
+uniform sampler2D s_bumpMap;
+
+varying vec2 v_texcoord;
+varying vec3 v_viewDirection;
+varying vec3 v_lightDirection;
+
+void main( void )
+{
+ // Fetch basemap color
+ vec4 baseColor = texture2D( s_baseMap, v_texcoord );
+
+ // Fetch the tangent space normal from normal map
+ vec3 normal = texture2D( s_bumpMap, v_texcoord ).xyz;
+
+ // Scale and bias from [0, 1] to [-1, 1] and normalize
+ normal = normalize( normal * 2.0 - 1.0 );
+
+ // Normalize the light direction and view direction
+ vec3 lightDirection = normalize( v_lightDirection );
+ vec3 viewDirection = normalize( v_viewDirection );
+
+ // Compute N.L
+ float nDotL = dot( normal, lightDirection );
+
+ // Compute reflection vector
+ vec3 reflection = ( 2.0 * normal * nDotL ) - lightDirection;
+
+ // Compute R.V
+ float rDotV = max( 0.0, dot( reflection, viewDirection ) );
+
+ // Compute Ambient term
+ vec4 ambient = u_ambient * baseColor;
+
+ // Compute Diffuse term
+ vec4 diffuse = u_diffuse * nDotL * baseColor;
+
+ // Compute Specular term
+ vec4 specular = u_specular * pow( rDotV, u_specularPower );
+
+ // Output final color
+ gl_FragColor = ambient + diffuse + specular;
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="s_baseMap" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="base" API=""/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="6" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmTextureObject NAME="s_bumpMap" API="OpenGL ES" STATE_INDEX="1" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="bump" API=""/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="6" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmSampler NAME="s_baseMap" API="" REGISTER="-1"/>
+ <RmSampler NAME="s_bumpMap" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_eyePosition" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_lightPosition" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matViewInverse" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matViewProjection" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_specular" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_specularPower" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_ambient" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_diffuse" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ </RmEffectWorkspace>
+</RENDER_MONKEY>
diff --git a/third_party/gles2_book/Chapter_13/PerFragmentLighting/Torus.3ds b/third_party/gles2_book/Chapter_13/PerFragmentLighting/Torus.3ds
new file mode 100644
index 0000000..cceac9aa
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/PerFragmentLighting/Torus.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/PostProcess/Car.3ds b/third_party/gles2_book/Chapter_13/PostProcess/Car.3ds
new file mode 100644
index 0000000..fb261dc
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/PostProcess/Car.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/PostProcess/Cube.x b/third_party/gles2_book/Chapter_13/PostProcess/Cube.x
new file mode 100644
index 0000000..35c0f4c
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/PostProcess/Cube.x
@@ -0,0 +1,215 @@
+xof 0303txt 0032
+template XSkinMeshHeader {
+ <3cf169ce-ff7c-44ab-93c0-f78f62d172e2>
+ WORD nMaxSkinWeightsPerVertex;
+ WORD nMaxSkinWeightsPerFace;
+ WORD nBones;
+}
+
+template VertexDuplicationIndices {
+ <b8d65549-d7c9-4995-89cf-53a9a8b031e3>
+ DWORD nIndices;
+ DWORD nOriginalVertices;
+ array DWORD indices[nIndices];
+}
+
+template SkinWeights {
+ <6f0d123b-bad2-4167-a0d0-80224f25fabb>
+ STRING transformNodeName;
+ DWORD nWeights;
+ array DWORD vertexIndices[nWeights];
+ array FLOAT weights[nWeights];
+ Matrix4x4 matrixOffset;
+}
+
+
+Frame SCENE_ROOT {
+
+
+ FrameTransformMatrix {
+ 1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000;;
+ }
+
+ Frame groundPlane_transform {
+
+
+ FrameTransformMatrix {
+ 10.000000,0.000000,0.000000,0.000000,0.000000,0.000000,10.000000,0.000000,0.000000,-1.000000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000;;
+ }
+ }
+
+ Frame persp {
+
+
+ FrameTransformMatrix {
+ -0.912120,-0.000000,0.409923,0.000000,0.165019,0.915393,0.367184,0.000000,-0.375241,0.402561,-0.834949,0.000000,-110.715416,118.776169,-246.352966,1.000000;;
+ }
+ }
+
+ Frame top {
+
+
+ FrameTransformMatrix {
+ 1.000000,0.000000,0.000000,0.000000,0.000000,0.000000,-1.000000,0.000000,0.000000,1.000000,0.000000,0.000000,-552.763062,10020.154297,128.411041,1.000000;;
+ }
+ }
+
+ Frame front {
+
+
+ FrameTransformMatrix {
+ 1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,64.176056,1999.952515,10134.481445,1.000000;;
+ }
+ }
+
+ Frame side {
+
+
+ FrameTransformMatrix {
+ 0.000000,0.000000,-1.000000,0.000000,0.000000,1.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,10124.230469,1585.576538,76.173088,1.000000;;
+ }
+ }
+
+ Frame pCube1 {
+
+
+ FrameTransformMatrix {
+ 1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000;;
+ }
+
+ Mesh pCubeShape1 {
+ 24;
+ -50.000000;-50.000000;50.000000;,
+ 50.000000;-50.000000;50.000000;,
+ -50.000000;50.000000;50.000000;,
+ 50.000000;50.000000;50.000000;,
+ -50.000000;50.000000;-50.000000;,
+ 50.000000;50.000000;-50.000000;,
+ -50.000000;-50.000000;-50.000000;,
+ 50.000000;-50.000000;-50.000000;,
+ -50.000000;50.000000;50.000000;,
+ 50.000000;50.000000;50.000000;,
+ -50.000000;50.000000;-50.000000;,
+ 50.000000;50.000000;-50.000000;,
+ -50.000000;-50.000000;-50.000000;,
+ 50.000000;-50.000000;-50.000000;,
+ 50.000000;-50.000000;50.000000;,
+ -50.000000;-50.000000;50.000000;,
+ 50.000000;-50.000000;50.000000;,
+ 50.000000;-50.000000;-50.000000;,
+ 50.000000;50.000000;-50.000000;,
+ 50.000000;50.000000;50.000000;,
+ -50.000000;-50.000000;-50.000000;,
+ -50.000000;-50.000000;50.000000;,
+ -50.000000;50.000000;50.000000;,
+ -50.000000;50.000000;-50.000000;;
+ 6;
+ 4;0,1,3,2;,
+ 4;8,9,5,4;,
+ 4;10,11,7,6;,
+ 4;12,13,14,15;,
+ 4;16,17,18,19;,
+ 4;20,21,22,23;;
+
+ MeshNormals {
+ 6;
+ -1.000000;0.000000;0.000000;,
+ 0.000000;-1.000000;0.000000;,
+ 0.000000;0.000000;-1.000000;,
+ 0.000000;0.000000;1.000000;,
+ 0.000000;1.000000;0.000000;,
+ 1.000000;0.000000;0.000000;;
+ 6;
+ 4;3,3,3,3;,
+ 4;4,4,4,4;,
+ 4;2,2,2,2;,
+ 4;1,1,1,1;,
+ 4;5,5,5,5;,
+ 4;0,0,0,0;;
+ }
+
+ MeshTextureCoords {
+ 24;
+ 0.000000;0.000000;,
+ 1.000000;0.000000;,
+ 0.000000;-1.000000;,
+ 1.000000;-1.000000;,
+ 0.000000;-2.000000;,
+ 1.000000;-2.000000;,
+ 0.000000;-3.000000;,
+ 1.000000;-3.000000;,
+ 0.000000;-1.000000;,
+ 1.000000;-1.000000;,
+ 0.000000;-2.000000;,
+ 1.000000;-2.000000;,
+ 0.000000;-3.000000;,
+ 1.000000;-3.000000;,
+ 1.000000;-4.000000;,
+ 0.000000;-4.000000;,
+ 1.000000;0.000000;,
+ 2.000000;0.000000;,
+ 2.000000;-1.000000;,
+ 1.000000;-1.000000;,
+ -1.000000;0.000000;,
+ 0.000000;0.000000;,
+ 0.000000;-1.000000;,
+ -1.000000;-1.000000;;
+ }
+
+ MeshMaterialList {
+ 1;
+ 6;
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0;
+
+ Material Arm_left {
+ 0.800000;0.800000;0.800000;1.000000;;
+ 0.500000;
+ 0.500000;0.500000;0.500000;;
+ 0.000000;0.000000;0.000000;;
+
+ TextureFilename {
+ "../Tex/EX_1_c0_arm_left.png";
+ }
+ }
+ }
+
+ VertexDuplicationIndices {
+ 24;
+ 8;
+ 0,
+ 1,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 2,
+ 3,
+ 4,
+ 5,
+ 6,
+ 7,
+ 1,
+ 0,
+ 1,
+ 7,
+ 5,
+ 3,
+ 6,
+ 0,
+ 2,
+ 4;
+ }
+ }
+ }
+}
+
+AnimationSet {
+
+} \ No newline at end of file
diff --git a/third_party/gles2_book/Chapter_13/PostProcess/Fieldstone.tga b/third_party/gles2_book/Chapter_13/PostProcess/Fieldstone.tga
new file mode 100644
index 0000000..8acafae
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/PostProcess/Fieldstone.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/PostProcess/PostProcess.rfx b/third_party/gles2_book/Chapter_13/PostProcess/PostProcess.rfx
new file mode 100644
index 0000000..d8e7047
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/PostProcess/PostProcess.rfx
@@ -0,0 +1,1395 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE RENDER_MONKEY [
+ <!ELEMENT RENDER_MONKEY
+ (
+ RmEffectWorkspace |
+ RmRegistryBranch |
+ RmClipboardNode
+ )?>
+
+ <!ELEMENT RmEffectWorkspace
+ (
+ RmRegistryBranch?,
+ RmPlugInData?,
+ RmStringVariable*,
+ (
+ ( RmDirectXEffect, RmOpenGLEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLEffect, RmDirectXEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLESEffect, RmDirectXEffect?, RmOpenGLEffect? )
+ )?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmEffectGroup
+ )*
+ )>
+
+ <!ELEMENT RmEffectGroup
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData
+ )*
+ )>
+
+ <!ELEMENT RmDirectXEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLESEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLESPass
+ )*
+ )>
+
+ <!ELEMENT RmPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ (
+ ( RmHLSLShader | RmShader ),
+ ( RmShader | RmHLSLShader )?
+ )
+ )?,
+ RmRenderTarget*,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject
+ )*
+ )>
+
+ <!ELEMENT RmGLPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLShader, RmGLShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLESPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLESShader, RmGLESShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant
+ )*
+ )>
+
+ <!ELEMENT RmHLSLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmGLESShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmTextureObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmTextureReference?,
+ RmState*
+ )>
+
+ <!ELEMENT RmLightObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmLightReference?
+ )>
+
+ <!ELEMENT RmMaterialObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmMaterialReference?
+ )>
+
+ <!ELEMENT RmRenderStateBlock
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmState
+ )*
+ )>
+
+ <!ELEMENT RmStreamMap
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmStream
+ )*
+ )>
+
+ <!ELEMENT RmStream ( RmPlugInData?, RmStreamChannel* )>
+
+ <!ELEMENT RmModelData ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmTextureReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmLightReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmMaterialReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmCameraReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmModelReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmStreamMapReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderableTexture ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderTarget ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmBooleanVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmFloatVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmVectorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMatrixVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmColorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmIntegerVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm2DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCubemapVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm3DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmLightVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMaterialVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCamera ( RmPlugInData?, RmStringVariable* )>
+
+ <!ELEMENT RmStringVariable ( RmTextDataBlock, RmPlugInData? )>
+
+ <!ELEMENT RmDynamicVariable
+ (
+ RmDynamicVariableValueContainer,
+ RmPlugInData?,
+ RmStringVariable?
+ )>
+
+ <!ELEMENT RmDynamicVariableValueContainer
+ (
+ RmPlugInData?,
+ RmDynamicVariableValue*
+ )>
+
+ <!ELEMENT RmTextDataBlock ( #PCDATA ) >
+
+ <!ELEMENT RmRegistryBranch
+ (
+ RmTextDataBlock?,
+ (
+ RmRegistryBranch |
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable
+ )*
+ )>
+
+ <!ELEMENT RmPlugInData
+ (
+ RmTextDataBlock?,
+ (
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable
+ )*
+ )>
+
+ <!ELEMENT RmClipboardNode
+ (
+ RmTextDataBlock?,
+ (
+ RmEffectWorkspace |
+ RmEffectGroup |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmPass |
+ RmGLPass |
+ RmGLESPass |
+ RmShader |
+ RmHLSLShader |
+ RmGLShader |
+ RmGLESShader |
+ RmShaderConstant |
+ RmSampler |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmRenderStateBlock |
+ RmState |
+ RmStreamMap |
+ RmStream |
+ RmStreamChannel |
+ RmModelData |
+ RmTextureReference |
+ RmLightReference |
+ RmMaterialReference |
+ RmModelReference |
+ RmStreamMapReference |
+ RmRenderableTexture |
+ RmRenderTarget |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmDynamicVariableValue |
+ RmColorVariable |
+ RmIntegerVariable |
+ RmStringVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRegistryBranch |
+ RmPlugInData |
+ RmCamera |
+ RmCameraReference
+ )*
+ )>
+
+ <!ELEMENT RmStreamChannel ( RmPlugInData? ) >
+ <!ELEMENT RmShaderConstant ( RmPlugInData? ) >
+ <!ELEMENT RmSampler ( RmPlugInData? ) >
+ <!ELEMENT RmState ( RmPlugInData? ) >
+ <!ELEMENT RmDynamicVariableValue ( RmPlugInData? ) >
+
+ <!ELEMENT RmShaderCode ( #PCDATA ) >
+
+ <!ATTLIST RmEffectWorkspace
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_EFFECT CDATA #REQUIRED
+ VALIDATION_STRING CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmEffectGroup
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDirectXEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLESEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmHLSLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ TARGET CDATA #REQUIRED
+ ENTRY_POINT CDATA #REQUIRED
+ COMPILER_FLAGS CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmGLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderConstant
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmSampler
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE_INDEX CDATA #REQUIRED
+ VERTEX_TEXTURE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmLightObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderStateBlock
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmState
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMap
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStream
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STRIDE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamChannel
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ DATA_SIZE CDATA #REQUIRED
+ DATA_TYPE CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ USAGE_INDEX CDATA #REQUIRED
+ ATTRIBUTE_NAME CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIENTATION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMapReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderableTexture
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ WIDTH CDATA #REQUIRED
+ HEIGHT CDATA #REQUIRED
+ FORMAT CDATA #REQUIRED
+ USE_VIEWPORT_DIMENSIONS ( TRUE | FALSE ) #REQUIRED
+ GENERATE_MIPMAPS ( TRUE | FALSE ) #REQUIRED
+ WIDTH_RATIO CDATA #REQUIRED
+ HEIGHT_RATIO CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderTarget
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ RENDER_TO_SCREEN ( TRUE | FALSE ) #REQUIRED
+ COLOR_CLEAR ( TRUE | FALSE ) #REQUIRED
+ DEPTH_CLEAR ( TRUE | FALSE ) #REQUIRED
+ CLEAR_COLOR_VALUE CDATA #REQUIRED
+ DEPTH_CLEAR_VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmBooleanVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmFloatVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmVectorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmMatrixVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ VALUE_4 CDATA #REQUIRED
+ VALUE_5 CDATA #REQUIRED
+ VALUE_6 CDATA #REQUIRED
+ VALUE_7 CDATA #REQUIRED
+ VALUE_8 CDATA #REQUIRED
+ VALUE_9 CDATA #REQUIRED
+ VALUE_10 CDATA #REQUIRED
+ VALUE_11 CDATA #REQUIRED
+ VALUE_12 CDATA #REQUIRED
+ VALUE_13 CDATA #REQUIRED
+ VALUE_14 CDATA #REQUIRED
+ VALUE_15 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VARIABLE_TYPE ( FLOAT | INTEGER | BOOLEAN ) #REQUIRED
+ ROWS CDATA #REQUIRED
+ COLUMNS CDATA #REQUIRED
+ FIXED_SIZE ( TRUE | FALSE ) #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariableValue
+ ROW_INDEX CDATA #REQUIRED
+ COLUMN_INDEX CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmColorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmIntegerVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmStringVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm2DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCubemapVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm3DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ LIGHT_ENABLED ( TRUE | FALSE ) #REQUIRED
+ LIGHT_TYPE ( POSITIONAL | DIRECTIONAL | SPOTLIGHT ) #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ POSITION_0 CDATA #REQUIRED
+ POSITION_1 CDATA #REQUIRED
+ POSITION_2 CDATA #REQUIRED
+ DIRECTION_0 CDATA #REQUIRED
+ DIRECTION_1 CDATA #REQUIRED
+ DIRECTION_2 CDATA #REQUIRED
+ ATTENUATION_0 CDATA #REQUIRED
+ ATTENUATION_1 CDATA #REQUIRED
+ ATTENUATION_2 CDATA #REQUIRED
+ SPOTLIGHT_THETA CDATA #REQUIRED
+ SPOTLIGHT_PHI CDATA #REQUIRED
+ RANGE CDATA #REQUIRED
+ FALLOFF CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ EMISSIVE_0 CDATA #REQUIRED
+ EMISSIVE_1 CDATA #REQUIRED
+ EMISSIVE_2 CDATA #REQUIRED
+ EMISSIVE_3 CDATA #REQUIRED
+ SPECULAR_POWER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRegistryBranch
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPlugInData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PLUGIN_GUID CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmClipboardNode
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCamera
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ CAMERA_POSITION_X CDATA #REQUIRED
+ CAMERA_POSITION_Y CDATA #REQUIRED
+ CAMERA_POSITION_Z CDATA #REQUIRED
+ LOOK_AT_VECTOR_X CDATA #REQUIRED
+ LOOK_AT_VECTOR_Y CDATA #REQUIRED
+ LOOK_AT_VECTOR_Z CDATA #REQUIRED
+ UP_VECTOR_X CDATA #REQUIRED
+ UP_VECTOR_Y CDATA #REQUIRED
+ UP_VECTOR_Z CDATA #REQUIRED
+ FOV CDATA #REQUIRED
+ NEAR_CLIP_PLANE CDATA #REQUIRED
+ FAR_CLIP_PLANE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCameraReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ USE_ACTIVE_CAMERA ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderCode
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+ <!ATTLIST RmTextDataBlock
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+]>
+<RENDER_MONKEY>
+ <RmEffectWorkspace NAME="Effect Workspace" API="" ACTIVE_EFFECT="Effect Workspace.PostProcess Effects.Simple Blur" VALIDATION_STRING="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_REGISTRY" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_LOCAL" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_PLUGIN" API="" XML_VERSION="RenderMonkey 1.71"><RmTextDataBlock TYPE="TEXT"><![CDATA[
+<DockingPaneLayouts><Application_Layout><Pane-1><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Artist Editor</Title><ID>1001</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>13</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>13</LastHolder></Pane-1><Pane-2><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_blurStep</Title><ID>1100</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>7</DockingHolder><FloatingHolder>18</FloatingHolder><LastHolder>18</LastHolder></Pane-2><Pane-3><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>1</Horiz><Pane-1>4</Pane-1><Pane-2>5</Pane-2><Pane-3>6</Pane-3><Pane-4>7</Pane-4><Pane-5>8</Pane-5><Panes>5</Panes></Pane-3><Pane-4><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-4><Pane-5><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-5><Pane-6><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-6><Pane-7><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-7><Pane-8><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>0</Horiz><Pane-1>9</Pane-1><Pane-2>14</Pane-2><Panes>2</Panes></Pane-8><Pane-9><Type>2</Type><DockingCX>0</DockingCX><DockingCY>791</DockingCY><Horiz>1</Horiz><Pane-1>10</Pane-1><Pane-2>12</Pane-2><Pane-3>13</Pane-3><Panes>3</Panes></Pane-9><Pane-10><Type>1</Type><DockingCX>336</DockingCX><DockingCY>250</DockingCY><Selected>11</Selected><Panes>1</Panes><Pane-1>11</Pane-1></Pane-10><Pane-11><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Workspace</Title><ID>1000</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>10</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>10</LastHolder></Pane-11><Pane-12><Type>4</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY></Pane-12><Pane-13><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-13><Pane-14><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>15</Selected><Panes>1</Panes><Pane-1>15</Pane-1></Pane-14><Pane-15><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Output</Title><ID>1002</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>14</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>14</LastHolder></Pane-15><Pane-16><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>17</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-16><Pane-17><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>18</Pane-1><Panes>1</Panes></Pane-17><Pane-18><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-18><Pane-19><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_blurStep</Title><ID>1101</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>6</DockingHolder><FloatingHolder>22</FloatingHolder><LastHolder>22</LastHolder></Pane-19><Pane-20><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>21</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-20><Pane-21><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>22</Pane-1><Panes>1</Panes></Pane-21><Pane-22><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-22><Pane-23><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_blurStep</Title><ID>1102</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>5</DockingHolder><FloatingHolder>26</FloatingHolder><LastHolder>26</LastHolder></Pane-23><Pane-24><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>25</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-24><Pane-25><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>26</Pane-1><Panes>1</Panes></Pane-25><Pane-26><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-26><Pane-27><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_blurStep</Title><ID>1103</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>4</DockingHolder><FloatingHolder>30</FloatingHolder><LastHolder>30</LastHolder></Pane-27><Pane-28><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>29</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-28><Pane-29><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>30</Pane-1><Panes>1</Panes></Pane-29><Pane-30><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-30><Summary><TopContainer>3</TopContainer><Client>12</Client><Panes>30</Panes></Summary></Application_Layout></DockingPaneLayouts>
+]]></RmTextDataBlock>
+ <RmRegistryBranch NAME="RmPreviewDx9Window" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLESWindow" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLWindow" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EffectPlacementRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Simple Blur" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Bloom" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="471" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="479" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewGLPreview" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmLightEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NoteEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderableTextureEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Bloom.renderTexture" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="256" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="102" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="278" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="442" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Bloom.renderTexture1" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="344" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="128" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="278" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="442" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Simple Blur.renderTexture" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="344" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="128" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="278" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="442" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderTargetEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Bloom.Draw Object Outline to Texture.renderTexture" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="344" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="128" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="316" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="296" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderStateBlockEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Bloom" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="408" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="244" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1149" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="514" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Bloom" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="202" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="275" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1063" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="514" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureGenerator" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmShaderEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Simple Blur" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Vertex Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Pass 0]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Bloom" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Vertex Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Draw to Screen]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="33" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="72" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmStreamEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured.Stream Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="258" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="128" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="851" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="270" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmScalarEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Bloom.Blur Pass 1.u_blurStep" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1101" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Bloom.Blur Pass 2.u_blurStep" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1102" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="Effect Workspace.PostProcess Effects.Bloom.Draw to Screen.u_blurStep" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1103" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+18/1/2008 11:15:10]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey Version 1.80 (build 125)]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="XML_VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey 1.71]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="BASE_WORKSPACE_PATH" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+D:\svn\redbook\Code\Chapter_13\PostProcess\]]></RmTextDataBlock></RmStringVariable>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmEffectGroup NAME="PostProcess Effects" API="">
+ <RmOpenGLESEffect NAME="Simple Blur" API="OpenGL ES" ACTIVE_CAMERA="Camera">
+ <RmCamera NAME="Camera" API="" CAMERA_POSITION_X="83.595619" CAMERA_POSITION_Y="229.281082" CAMERA_POSITION_Z="39.789570" LOOK_AT_VECTOR_X="0.000000" LOOK_AT_VECTOR_Y="0.000000" LOOK_AT_VECTOR_Z="0.000000" UP_VECTOR_X="-0.506225" UP_VECTOR_Y="0.035030" UP_VECTOR_Z="0.861690" FOV="45.000000" NEAR_CLIP_PLANE="1.000000" FAR_CLIP_PLANE="1000.000000"/>
+ <RmFloatVariable NAME="u_blurStep" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="SinTime0_X" VALUE="0.974171" MIN="0.000000" MAX="0.010000" CLAMP="TRUE"/>
+ <RmMatrixVariable NAME="u_matViewProjection" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="2.185649" VALUE_1="0.000000" VALUE_2="0.000000" VALUE_3="0.000000" VALUE_4="0.000000" VALUE_5="2.414213" VALUE_6="0.000000" VALUE_7="0.000000" VALUE_8="0.000000" VALUE_9="0.000000" VALUE_10="-1.001001" VALUE_11="199.199203" VALUE_12="0.000000" VALUE_13="0.000000" VALUE_14="-1.000000" VALUE_15="200.000000"/>
+ <Rm2DTextureVariable NAME="base" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" FILE_NAME="Fieldstone.tga" ORIGIN="0"/>
+ <RmRenderableTexture NAME="renderTexture" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" FILE_NAME="" ORIGIN="0" WIDTH="512" HEIGHT="512" FORMAT="21" USE_VIEWPORT_DIMENSIONS="FALSE" GENERATE_MIPMAPS="TRUE" WIDTH_RATIO="1.000000" HEIGHT_RATIO="1.000000"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="20">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="a_vertex"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="a_texCoord0"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="Model" API="" FILE_NAME=".\Cube.x" ORIENTATION="0"/>
+ <RmModelData NAME="ScreenAlignedQuad" API="" FILE_NAME=".\ScreenAlignedQuad.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Pass 0" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="Model" API=""/>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+
+uniform sampler2D baseMap;
+varying vec2 v_texCoord;
+
+void main( void )
+{
+ gl_FragColor = texture2D( baseMap, v_texCoord );
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform mat4 u_matViewProjection;
+attribute vec4 a_vertex;
+attribute vec2 a_texCoord0;
+varying vec2 v_texCoord;
+
+void main( void )
+{
+ gl_Position = u_matViewProjection * a_vertex;
+ v_texCoord = a_texCoord0.xy;
+}]]></RmShaderCode></RmGLESShader>
+ <RmRenderTarget NAME="renderTexture" API="" INDEX="0" RENDER_TO_SCREEN="FALSE" COLOR_CLEAR="TRUE" DEPTH_CLEAR="TRUE" CLEAR_COLOR_VALUE="-16777216" DEPTH_CLEAR_VALUE="1.000000"/>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="baseMap" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="base" API=""/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="6" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmSampler NAME="baseMap" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matViewProjection" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ <RmGLESPass NAME="Pass 1" API="OpenGL ES" PASS_INDEX="1" ENABLED="TRUE">
+ <RmModelReference NAME="ScreenAlignedQuad" API=""/>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+attribute vec4 a_vertex;
+varying vec2 v_texCoord;
+
+void main(void)
+{
+ vec2 P = sign( a_vertex.xy );
+ gl_Position = vec4( P, 0.0, 1.0 );
+
+ v_texCoord = P * 0.5 + 0.5;
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+uniform sampler2D renderTexture;
+varying vec2 v_texCoord;
+uniform float u_blurStep;
+
+void main(void)
+{
+ vec4 sample0,
+ sample1,
+ sample2,
+ sample3;
+
+ float step = u_blurStep / 100.0;
+
+ sample0 = texture2D ( renderTexture,
+ vec2 ( v_texCoord.x - step, v_texCoord.y - step ) );
+ sample1 = texture2D ( renderTexture,
+ vec2 ( v_texCoord.x + step, v_texCoord.y + step ) );
+ sample2 = texture2D ( renderTexture,
+ vec2 ( v_texCoord.x + step, v_texCoord.y - step ) );
+ sample3 = texture2D ( renderTexture,
+ vec2 ( v_texCoord.x - step, v_texCoord.y + step) );
+
+ gl_FragColor = (sample0 + sample1 + sample2 + sample3) / 4.0;
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="renderTexture" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="renderTexture" API=""/>
+ </RmTextureObject>
+ <RmSampler NAME="renderTexture" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_blurStep" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ <RmOpenGLESEffect NAME="Bloom" API="OpenGL ES" ACTIVE_CAMERA="Camera">
+ <RmCamera NAME="Camera" API="" CAMERA_POSITION_X="33.139557" CAMERA_POSITION_Y="-92.293312" CAMERA_POSITION_Z="55.385082" LOOK_AT_VECTOR_X="-9.544210" LOOK_AT_VECTOR_Y="-3.399710" LOOK_AT_VECTOR_Z="0.434872" UP_VECTOR_X="-0.471409" UP_VECTOR_Y="0.288774" UP_VECTOR_Z="0.833297" FOV="45.000000" NEAR_CLIP_PLANE="60.290936" FAR_CLIP_PLANE="1169.461426"/>
+ <RmMatrixVariable NAME="u_matViewProjection" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="2.287980" VALUE_1="0.000000" VALUE_2="0.000000" VALUE_3="0.000000" VALUE_4="0.000000" VALUE_5="2.414213" VALUE_6="0.000000" VALUE_7="0.000000" VALUE_8="0.000000" VALUE_9="0.000000" VALUE_10="-1.001001" VALUE_11="199.199203" VALUE_12="0.000000" VALUE_13="0.000000" VALUE_14="-1.000000" VALUE_15="200.000000"/>
+ <Rm2DTextureVariable NAME="base" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" FILE_NAME="Fieldstone.tga" ORIGIN="0"/>
+ <RmRenderableTexture NAME="renderTexture" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" FILE_NAME="" ORIGIN="0" WIDTH="128" HEIGHT="128" FORMAT="21" USE_VIEWPORT_DIMENSIONS="FALSE" GENERATE_MIPMAPS="TRUE" WIDTH_RATIO="1.000000" HEIGHT_RATIO="1.000000"/>
+ <RmRenderableTexture NAME="renderTexture1" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" FILE_NAME="" ORIGIN="0" WIDTH="128" HEIGHT="128" FORMAT="21" USE_VIEWPORT_DIMENSIONS="FALSE" GENERATE_MIPMAPS="TRUE" WIDTH_RATIO="1.000000" HEIGHT_RATIO="1.000000"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="20">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="a_vertex"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="a_texCoord0"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="ScreenAlignedQuad" API="" FILE_NAME=".\ScreenAlignedQuad.3ds" ORIENTATION="0"/>
+ <RmModelData NAME="Model" API="" FILE_NAME=".\Car.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Draw Object Outline to Texture" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="Model" API=""/>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+
+uniform sampler2D baseMap;
+varying vec2 v_texCoord;
+
+void main( void )
+{
+ gl_FragColor = vec4( 0.0 );
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform mat4 u_matViewProjection;
+attribute vec4 a_vertex;
+attribute vec2 a_texCoord0;
+varying vec2 v_texCoord;
+
+void main( void )
+{
+ gl_Position = u_matViewProjection * a_vertex;
+ v_texCoord = a_texCoord0.xy;
+}]]></RmShaderCode></RmGLESShader>
+ <RmRenderTarget NAME="renderTexture" API="" INDEX="0" RENDER_TO_SCREEN="FALSE" COLOR_CLEAR="TRUE" DEPTH_CLEAR="TRUE" CLEAR_COLOR_VALUE="786431" DEPTH_CLEAR_VALUE="1.000000"/>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="baseMap" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="base" API=""/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="6" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmShaderConstant NAME="u_matViewProjection" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ <RmGLESPass NAME="Blur Pass 1" API="OpenGL ES" PASS_INDEX="1" ENABLED="TRUE">
+ <RmModelReference NAME="ScreenAlignedQuad" API=""/>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+attribute vec4 a_vertex;
+varying vec2 v_texCoord;
+
+void main(void)
+{
+ vec2 P = sign( a_vertex.xy );
+ gl_Position = vec4( P, 0.0, 1.0 );
+
+ v_texCoord = P * 0.5 + 0.5;
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+uniform sampler2D renderTexture;
+varying vec2 v_texCoord;
+uniform float u_blurStep;
+
+void main(void)
+{
+ vec4 sample0,
+ sample1,
+ sample2,
+ sample3;
+
+ float step = u_blurStep / 100.0;
+
+ sample0 = texture2D ( renderTexture,
+ vec2 ( v_texCoord.x - step, v_texCoord.y - step ) );
+ sample1 = texture2D ( renderTexture,
+ vec2 ( v_texCoord.x + step, v_texCoord.y + step ) );
+ sample2 = texture2D ( renderTexture,
+ vec2 ( v_texCoord.x + step, v_texCoord.y - step ) );
+ sample3 = texture2D ( renderTexture,
+ vec2 ( v_texCoord.x - step, v_texCoord.y + step) );
+
+ gl_FragColor = (sample0 + sample1 + sample2 + sample3) / 4.0;
+}]]></RmShaderCode></RmGLESShader>
+ <RmRenderTarget NAME="renderTexture1" API="" INDEX="0" RENDER_TO_SCREEN="FALSE" COLOR_CLEAR="TRUE" DEPTH_CLEAR="TRUE" CLEAR_COLOR_VALUE="-16777216" DEPTH_CLEAR_VALUE="1.000000"/>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmFloatVariable NAME="u_blurStep" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE="1.000000" MIN="0.000000" MAX="0.000000" CLAMP="FALSE"/>
+ <RmTextureObject NAME="renderTexture" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="renderTexture" API=""/>
+ </RmTextureObject>
+ <RmSampler NAME="renderTexture" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_blurStep" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ <RmGLESPass NAME="Blur Pass 2" API="OpenGL ES" PASS_INDEX="2" ENABLED="TRUE">
+ <RmModelReference NAME="ScreenAlignedQuad" API=""/>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+attribute vec4 a_vertex;
+varying vec2 v_texCoord;
+
+void main(void)
+{
+ vec2 P = sign( a_vertex.xy );
+ gl_Position = vec4( P, 0.0, 1.0 );
+
+ v_texCoord = P * 0.5 + 0.5;
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+uniform sampler2D renderTexture1;
+varying vec2 v_texCoord;
+uniform float u_blurStep;
+
+void main(void)
+{
+ vec4 sample0,
+ sample1,
+ sample2,
+ sample3;
+
+ float step = u_blurStep / 100.0;
+
+ sample0 = texture2D ( renderTexture1,
+ vec2 ( v_texCoord.x - step, v_texCoord.y - step ) );
+ sample1 = texture2D ( renderTexture1,
+ vec2 ( v_texCoord.x + step, v_texCoord.y + step ) );
+ sample2 = texture2D ( renderTexture1,
+ vec2 ( v_texCoord.x + step, v_texCoord.y - step ) );
+ sample3 = texture2D ( renderTexture1,
+ vec2 ( v_texCoord.x - step, v_texCoord.y + step) );
+
+ gl_FragColor = (sample0 + sample1 + sample2 + sample3) / 4.0;
+}]]></RmShaderCode></RmGLESShader>
+ <RmRenderTarget NAME="renderTexture" API="" INDEX="0" RENDER_TO_SCREEN="FALSE" COLOR_CLEAR="TRUE" DEPTH_CLEAR="TRUE" CLEAR_COLOR_VALUE="-16777216" DEPTH_CLEAR_VALUE="1.000000"/>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmFloatVariable NAME="u_blurStep" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE="2.000000" MIN="0.000000" MAX="0.000000" CLAMP="FALSE"/>
+ <RmTextureObject NAME="renderTexture1" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="renderTexture1" API=""/>
+ </RmTextureObject>
+ <RmSampler NAME="renderTexture1" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_blurStep" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ <RmGLESPass NAME="Draw Object to Screen" API="OpenGL ES" PASS_INDEX="3" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="Model" API=""/>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+
+uniform sampler2D baseMap;
+varying vec2 v_texCoord;
+
+void main( void )
+{
+ gl_FragColor = texture2D( baseMap, v_texCoord );
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform mat4 u_matViewProjection;
+attribute vec4 a_vertex;
+attribute vec2 a_texCoord0;
+varying vec2 v_texCoord;
+
+void main( void )
+{
+ gl_Position = u_matViewProjection * a_vertex;
+ v_texCoord = a_texCoord0.xy;
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="baseMap" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="base" API=""/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="6" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmSampler NAME="baseMap" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matViewProjection" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ <RmGLESPass NAME="Draw to Screen" API="OpenGL ES" PASS_INDEX="4" ENABLED="TRUE">
+ <RmModelReference NAME="ScreenAlignedQuad" API=""/>
+ <RmRenderStateBlock NAME="Render State" API="OpenGL ES">
+ <RmState NAME="GL_BlendSourceRGB" API="OpenGL ES" STATE="48" VALUE="2" USAGE="RENDER_STATE"/>
+ <RmState NAME="GL_BlendDestRGB" API="OpenGL ES" STATE="49" VALUE="2" USAGE="RENDER_STATE"/>
+ <RmState NAME="GL_BlendEnable" API="OpenGL ES" STATE="46" VALUE="1" USAGE="RENDER_STATE"/>
+ </RmRenderStateBlock>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+uniform sampler2D renderTexture;
+varying vec2 v_texCoord;
+
+void main(void)
+{
+ gl_FragColor = texture2D( renderTexture, v_texCoord );
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+attribute vec4 a_vertex;
+varying vec2 v_texCoord;
+
+void main(void)
+{
+ vec2 P = sign( a_vertex.xy );
+ gl_Position = vec4( P, 0.0, 1.0 );
+
+ v_texCoord = P * 0.5 + 0.5;
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="renderTexture" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="renderTexture" API=""/>
+ </RmTextureObject>
+ <RmSampler NAME="renderTexture" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ </RmEffectGroup>
+ </RmEffectWorkspace>
+</RENDER_MONKEY>
diff --git a/third_party/gles2_book/Chapter_13/PostProcess/ScreenAlignedQuad.3ds b/third_party/gles2_book/Chapter_13/PostProcess/ScreenAlignedQuad.3ds
new file mode 100644
index 0000000..619124b
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/PostProcess/ScreenAlignedQuad.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/ProceduralTextures/Checker.rfx b/third_party/gles2_book/Chapter_13/ProceduralTextures/Checker.rfx
new file mode 100644
index 0000000..3da57a8
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ProceduralTextures/Checker.rfx
@@ -0,0 +1,1081 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE RENDER_MONKEY [
+ <!ELEMENT RENDER_MONKEY
+ (
+ RmEffectWorkspace |
+ RmRegistryBranch |
+ RmClipboardNode
+ )?>
+
+ <!ELEMENT RmEffectWorkspace
+ (
+ RmRegistryBranch?,
+ RmPlugInData?,
+ RmStringVariable*,
+ (
+ ( RmDirectXEffect, RmOpenGLEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLEffect, RmDirectXEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLESEffect, RmDirectXEffect?, RmOpenGLEffect? )
+ )?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmEffectGroup
+ )*
+ )>
+
+ <!ELEMENT RmEffectGroup
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData
+ )*
+ )>
+
+ <!ELEMENT RmDirectXEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLESEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLESPass
+ )*
+ )>
+
+ <!ELEMENT RmPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ (
+ ( RmHLSLShader | RmShader ),
+ ( RmShader | RmHLSLShader )?
+ )
+ )?,
+ RmRenderTarget*,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject
+ )*
+ )>
+
+ <!ELEMENT RmGLPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLShader, RmGLShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLESPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLESShader, RmGLESShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant
+ )*
+ )>
+
+ <!ELEMENT RmHLSLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmGLESShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmTextureObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmTextureReference?,
+ RmState*
+ )>
+
+ <!ELEMENT RmLightObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmLightReference?
+ )>
+
+ <!ELEMENT RmMaterialObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmMaterialReference?
+ )>
+
+ <!ELEMENT RmRenderStateBlock
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmState
+ )*
+ )>
+
+ <!ELEMENT RmStreamMap
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmStream
+ )*
+ )>
+
+ <!ELEMENT RmStream ( RmPlugInData?, RmStreamChannel* )>
+
+ <!ELEMENT RmModelData ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmTextureReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmLightReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmMaterialReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmCameraReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmModelReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmStreamMapReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderableTexture ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderTarget ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmBooleanVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmFloatVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmVectorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMatrixVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmColorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmIntegerVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm2DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCubemapVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm3DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmLightVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMaterialVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCamera ( RmPlugInData?, RmStringVariable* )>
+
+ <!ELEMENT RmStringVariable ( RmTextDataBlock, RmPlugInData? )>
+
+ <!ELEMENT RmDynamicVariable
+ (
+ RmDynamicVariableValueContainer,
+ RmPlugInData?,
+ RmStringVariable?
+ )>
+
+ <!ELEMENT RmDynamicVariableValueContainer
+ (
+ RmPlugInData?,
+ RmDynamicVariableValue*
+ )>
+
+ <!ELEMENT RmTextDataBlock ( #PCDATA ) >
+
+ <!ELEMENT RmRegistryBranch
+ (
+ RmTextDataBlock?,
+ (
+ RmRegistryBranch |
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable
+ )*
+ )>
+
+ <!ELEMENT RmPlugInData
+ (
+ RmTextDataBlock?,
+ (
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable
+ )*
+ )>
+
+ <!ELEMENT RmClipboardNode
+ (
+ RmTextDataBlock?,
+ (
+ RmEffectWorkspace |
+ RmEffectGroup |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmPass |
+ RmGLPass |
+ RmGLESPass |
+ RmShader |
+ RmHLSLShader |
+ RmGLShader |
+ RmGLESShader |
+ RmShaderConstant |
+ RmSampler |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmRenderStateBlock |
+ RmState |
+ RmStreamMap |
+ RmStream |
+ RmStreamChannel |
+ RmModelData |
+ RmTextureReference |
+ RmLightReference |
+ RmMaterialReference |
+ RmModelReference |
+ RmStreamMapReference |
+ RmRenderableTexture |
+ RmRenderTarget |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmDynamicVariableValue |
+ RmColorVariable |
+ RmIntegerVariable |
+ RmStringVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRegistryBranch |
+ RmPlugInData |
+ RmCamera |
+ RmCameraReference
+ )*
+ )>
+
+ <!ELEMENT RmStreamChannel ( RmPlugInData? ) >
+ <!ELEMENT RmShaderConstant ( RmPlugInData? ) >
+ <!ELEMENT RmSampler ( RmPlugInData? ) >
+ <!ELEMENT RmState ( RmPlugInData? ) >
+ <!ELEMENT RmDynamicVariableValue ( RmPlugInData? ) >
+
+ <!ELEMENT RmShaderCode ( #PCDATA ) >
+
+ <!ATTLIST RmEffectWorkspace
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_EFFECT CDATA #REQUIRED
+ VALIDATION_STRING CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmEffectGroup
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDirectXEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLESEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmHLSLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ TARGET CDATA #REQUIRED
+ ENTRY_POINT CDATA #REQUIRED
+ COMPILER_FLAGS CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmGLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderConstant
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmSampler
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE_INDEX CDATA #REQUIRED
+ VERTEX_TEXTURE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmLightObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderStateBlock
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmState
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMap
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStream
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STRIDE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamChannel
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ DATA_SIZE CDATA #REQUIRED
+ DATA_TYPE CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ USAGE_INDEX CDATA #REQUIRED
+ ATTRIBUTE_NAME CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIENTATION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMapReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderableTexture
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ WIDTH CDATA #REQUIRED
+ HEIGHT CDATA #REQUIRED
+ FORMAT CDATA #REQUIRED
+ USE_VIEWPORT_DIMENSIONS ( TRUE | FALSE ) #REQUIRED
+ GENERATE_MIPMAPS ( TRUE | FALSE ) #REQUIRED
+ WIDTH_RATIO CDATA #REQUIRED
+ HEIGHT_RATIO CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderTarget
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ RENDER_TO_SCREEN ( TRUE | FALSE ) #REQUIRED
+ COLOR_CLEAR ( TRUE | FALSE ) #REQUIRED
+ DEPTH_CLEAR ( TRUE | FALSE ) #REQUIRED
+ CLEAR_COLOR_VALUE CDATA #REQUIRED
+ DEPTH_CLEAR_VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmBooleanVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmFloatVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmVectorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmMatrixVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ VALUE_4 CDATA #REQUIRED
+ VALUE_5 CDATA #REQUIRED
+ VALUE_6 CDATA #REQUIRED
+ VALUE_7 CDATA #REQUIRED
+ VALUE_8 CDATA #REQUIRED
+ VALUE_9 CDATA #REQUIRED
+ VALUE_10 CDATA #REQUIRED
+ VALUE_11 CDATA #REQUIRED
+ VALUE_12 CDATA #REQUIRED
+ VALUE_13 CDATA #REQUIRED
+ VALUE_14 CDATA #REQUIRED
+ VALUE_15 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VARIABLE_TYPE ( FLOAT | INTEGER | BOOLEAN ) #REQUIRED
+ ROWS CDATA #REQUIRED
+ COLUMNS CDATA #REQUIRED
+ FIXED_SIZE ( TRUE | FALSE ) #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariableValue
+ ROW_INDEX CDATA #REQUIRED
+ COLUMN_INDEX CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmColorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmIntegerVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmStringVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm2DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCubemapVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm3DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ LIGHT_ENABLED ( TRUE | FALSE ) #REQUIRED
+ LIGHT_TYPE ( POSITIONAL | DIRECTIONAL | SPOTLIGHT ) #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ POSITION_0 CDATA #REQUIRED
+ POSITION_1 CDATA #REQUIRED
+ POSITION_2 CDATA #REQUIRED
+ DIRECTION_0 CDATA #REQUIRED
+ DIRECTION_1 CDATA #REQUIRED
+ DIRECTION_2 CDATA #REQUIRED
+ ATTENUATION_0 CDATA #REQUIRED
+ ATTENUATION_1 CDATA #REQUIRED
+ ATTENUATION_2 CDATA #REQUIRED
+ SPOTLIGHT_THETA CDATA #REQUIRED
+ SPOTLIGHT_PHI CDATA #REQUIRED
+ RANGE CDATA #REQUIRED
+ FALLOFF CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ EMISSIVE_0 CDATA #REQUIRED
+ EMISSIVE_1 CDATA #REQUIRED
+ EMISSIVE_2 CDATA #REQUIRED
+ EMISSIVE_3 CDATA #REQUIRED
+ SPECULAR_POWER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRegistryBranch
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPlugInData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PLUGIN_GUID CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmClipboardNode
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCamera
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ CAMERA_POSITION_X CDATA #REQUIRED
+ CAMERA_POSITION_Y CDATA #REQUIRED
+ CAMERA_POSITION_Z CDATA #REQUIRED
+ LOOK_AT_VECTOR_X CDATA #REQUIRED
+ LOOK_AT_VECTOR_Y CDATA #REQUIRED
+ LOOK_AT_VECTOR_Z CDATA #REQUIRED
+ UP_VECTOR_X CDATA #REQUIRED
+ UP_VECTOR_Y CDATA #REQUIRED
+ UP_VECTOR_Z CDATA #REQUIRED
+ FOV CDATA #REQUIRED
+ NEAR_CLIP_PLANE CDATA #REQUIRED
+ FAR_CLIP_PLANE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCameraReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ USE_ACTIVE_CAMERA ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderCode
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+ <!ATTLIST RmTextDataBlock
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+]>
+<RENDER_MONKEY>
+ <RmEffectWorkspace NAME="Effect Workspace" API="" ACTIVE_EFFECT="Effect Workspace.Position" VALIDATION_STRING="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_REGISTRY" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_LOCAL" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_PLUGIN" API="" XML_VERSION="RenderMonkey 1.71"><RmTextDataBlock TYPE="TEXT"><![CDATA[
+<DockingPaneLayouts><Application_Layout><Pane-1><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Artist Editor</Title><ID>1001</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>7</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>7</LastHolder></Pane-1><Pane-2><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>0</Horiz><Pane-1>3</Pane-1><Pane-2>8</Pane-2><Panes>2</Panes></Pane-2><Pane-3><Type>2</Type><DockingCX>0</DockingCX><DockingCY>808</DockingCY><Horiz>1</Horiz><Pane-1>4</Pane-1><Pane-2>6</Pane-2><Pane-3>7</Pane-3><Panes>3</Panes></Pane-3><Pane-4><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>5</Selected><Panes>1</Panes><Pane-1>5</Pane-1></Pane-4><Pane-5><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Workspace</Title><ID>1000</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>4</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>4</LastHolder></Pane-5><Pane-6><Type>4</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY></Pane-6><Pane-7><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-7><Pane-8><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>9</Selected><Panes>1</Panes><Pane-1>9</Pane-1></Pane-8><Pane-9><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Output</Title><ID>1002</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>8</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>8</LastHolder></Pane-9><Summary><TopContainer>2</TopContainer><Client>6</Client><Panes>9</Panes></Summary></Application_Layout></DockingPaneLayouts>
+]]></RmTextDataBlock>
+ <RmRegistryBranch NAME="RmRenderStateBlockEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="54" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="70" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1283" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="434" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmStreamEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position.Stream Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="459" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="323" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="851" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="270" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewGLWindow" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EffectPlacementRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmColorEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position.u_color1" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1100" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="FloatingPoint" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="FALSE"/>
+ <RmIntegerVariable NAME="ColorType" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="LargeSize" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="TRUE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmDynamicVariableEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position.u_frequency" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1101" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="ShowSetup" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="TRUE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewDx9Window" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLESWindow" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLPreview" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmLightEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NoteEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderableTextureEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderTargetEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmShaderEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Fragment Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Pass 0]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="967" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="718" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureGenerator" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+20/1/2008 22:54:49]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey Version 1.71 (build 59)]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="XML_VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey 1.71]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="BASE_WORKSPACE_PATH" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+C:\book\ogles\Code\Chapter_13\ProceduralTextures\]]></RmTextDataBlock></RmStringVariable>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmOpenGLESEffect NAME="Position" API="OpenGL ES" ACTIVE_CAMERA="Camera">
+ <RmCamera NAME="Camera" API="" CAMERA_POSITION_X="1.482474" CAMERA_POSITION_Y="-1.227030" CAMERA_POSITION_Z="-2.968942" LOOK_AT_VECTOR_X="0.001000" LOOK_AT_VECTOR_Y="0.001000" LOOK_AT_VECTOR_Z="0.001000" UP_VECTOR_X="-0.087063" UP_VECTOR_Y="0.904525" UP_VECTOR_Z="-0.417437" FOV="45.000000" NEAR_CLIP_PLANE="1.207107" FAR_CLIP_PLANE="23.414213"/>
+ <RmDynamicVariable NAME="u_frequency" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VARIABLE_TYPE="INTEGER" ROWS="1" COLUMNS="1" FIXED_SIZE="TRUE" MIN="-100" MAX="100" CLAMP="FALSE" NORMALIZE="FALSE">
+ <RmDynamicVariableValueContainer>
+ <RmDynamicVariableValue ROW_INDEX="0" COLUMN_INDEX="0" VALUE="6"/>
+ </RmDynamicVariableValueContainer>
+ </RmDynamicVariable>
+ <RmMatrixVariable NAME="u_mvpMatrix" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="-2.014508" VALUE_1="-0.552268" VALUE_2="-0.776526" VALUE_3="0.003343" VALUE_4="-0.210189" VALUE_5="2.183717" VALUE_6="-1.007783" VALUE_7="-0.000962" VALUE_8="-0.441388" VALUE_9="0.365878" VALUE_10="0.884861" VALUE_11="2.457668" VALUE_12="-0.418633" VALUE_13="0.347015" VALUE_14="0.839242" VALUE_15="3.538071"/>
+ <RmColorVariable NAME="u_color1" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="0.000000" VALUE_1="0.000000" VALUE_2="0.000000" VALUE_3="1.000000"/>
+ <RmColorVariable NAME="u_color0" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="1.000000" VALUE_1="1.000000" VALUE_2="1.000000" VALUE_3="1.000000"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="20">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="a_position"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="a_st"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="Model" API="" FILE_NAME=".\ScreenAlignedQuad.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Pass 0" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="Model" API=""/>
+ <RmRenderStateBlock NAME="Render State" API="OpenGL ES">
+ <RmState NAME="GL_CullMode" API="OpenGL ES" STATE="8" VALUE="1" USAGE="RENDER_STATE"/>
+ </RmRenderStateBlock>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+
+uniform mat4 u_mvpMatrix;
+
+attribute vec4 a_position;
+attribute vec2 a_st;
+
+varying vec2 v_st;
+
+void
+main()
+{
+ v_st = a_st;
+ gl_Position = u_mvpMatrix * a_position;
+}
+]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+#extension GL_OES_standard_derivatives:enable
+
+precision highp float;
+
+uniform int u_frequency;
+uniform vec4 u_color0;
+uniform vec4 u_color1;
+
+varying vec2 v_st;
+
+void
+main()
+{
+ float s, t, delta;
+
+ s = mod(floor(v_st.x * float(u_frequency * 2)), 2.0);
+ t = mod(floor(v_st.y * float(u_frequency * 2)), 2.0);
+ delta = abs(s - t);
+
+ gl_FragColor = mix(u_color1, u_color0, delta);
+}
+]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmShaderConstant NAME="u_color0" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_color1" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_frequency" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_mvpMatrix" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ </RmEffectWorkspace>
+</RENDER_MONKEY>
diff --git a/third_party/gles2_book/Chapter_13/ProceduralTextures/CheckerAA.rfx b/third_party/gles2_book/Chapter_13/ProceduralTextures/CheckerAA.rfx
new file mode 100644
index 0000000..6f73d7e
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ProceduralTextures/CheckerAA.rfx
@@ -0,0 +1,1109 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE RENDER_MONKEY [
+ <!ELEMENT RENDER_MONKEY
+ (
+ RmEffectWorkspace |
+ RmRegistryBranch |
+ RmClipboardNode
+ )?>
+
+ <!ELEMENT RmEffectWorkspace
+ (
+ RmRegistryBranch?,
+ RmPlugInData?,
+ RmStringVariable*,
+ (
+ ( RmDirectXEffect, RmOpenGLEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLEffect, RmDirectXEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLESEffect, RmDirectXEffect?, RmOpenGLEffect? )
+ )?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmEffectGroup
+ )*
+ )>
+
+ <!ELEMENT RmEffectGroup
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData
+ )*
+ )>
+
+ <!ELEMENT RmDirectXEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLESEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLESPass
+ )*
+ )>
+
+ <!ELEMENT RmPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ (
+ ( RmHLSLShader | RmShader ),
+ ( RmShader | RmHLSLShader )?
+ )
+ )?,
+ RmRenderTarget*,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject
+ )*
+ )>
+
+ <!ELEMENT RmGLPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLShader, RmGLShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLESPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLESShader, RmGLESShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant
+ )*
+ )>
+
+ <!ELEMENT RmHLSLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmGLESShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmTextureObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmTextureReference?,
+ RmState*
+ )>
+
+ <!ELEMENT RmLightObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmLightReference?
+ )>
+
+ <!ELEMENT RmMaterialObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmMaterialReference?
+ )>
+
+ <!ELEMENT RmRenderStateBlock
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmState
+ )*
+ )>
+
+ <!ELEMENT RmStreamMap
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmStream
+ )*
+ )>
+
+ <!ELEMENT RmStream ( RmPlugInData?, RmStreamChannel* )>
+
+ <!ELEMENT RmModelData ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmTextureReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmLightReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmMaterialReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmCameraReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmModelReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmStreamMapReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderableTexture ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderTarget ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmBooleanVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmFloatVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmVectorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMatrixVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmColorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmIntegerVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm2DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCubemapVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm3DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmLightVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMaterialVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCamera ( RmPlugInData?, RmStringVariable* )>
+
+ <!ELEMENT RmStringVariable ( RmTextDataBlock, RmPlugInData? )>
+
+ <!ELEMENT RmDynamicVariable
+ (
+ RmDynamicVariableValueContainer,
+ RmPlugInData?,
+ RmStringVariable?
+ )>
+
+ <!ELEMENT RmDynamicVariableValueContainer
+ (
+ RmPlugInData?,
+ RmDynamicVariableValue*
+ )>
+
+ <!ELEMENT RmTextDataBlock ( #PCDATA ) >
+
+ <!ELEMENT RmRegistryBranch
+ (
+ RmTextDataBlock?,
+ (
+ RmRegistryBranch |
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable
+ )*
+ )>
+
+ <!ELEMENT RmPlugInData
+ (
+ RmTextDataBlock?,
+ (
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable
+ )*
+ )>
+
+ <!ELEMENT RmClipboardNode
+ (
+ RmTextDataBlock?,
+ (
+ RmEffectWorkspace |
+ RmEffectGroup |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmPass |
+ RmGLPass |
+ RmGLESPass |
+ RmShader |
+ RmHLSLShader |
+ RmGLShader |
+ RmGLESShader |
+ RmShaderConstant |
+ RmSampler |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmRenderStateBlock |
+ RmState |
+ RmStreamMap |
+ RmStream |
+ RmStreamChannel |
+ RmModelData |
+ RmTextureReference |
+ RmLightReference |
+ RmMaterialReference |
+ RmModelReference |
+ RmStreamMapReference |
+ RmRenderableTexture |
+ RmRenderTarget |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmDynamicVariableValue |
+ RmColorVariable |
+ RmIntegerVariable |
+ RmStringVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRegistryBranch |
+ RmPlugInData |
+ RmCamera |
+ RmCameraReference
+ )*
+ )>
+
+ <!ELEMENT RmStreamChannel ( RmPlugInData? ) >
+ <!ELEMENT RmShaderConstant ( RmPlugInData? ) >
+ <!ELEMENT RmSampler ( RmPlugInData? ) >
+ <!ELEMENT RmState ( RmPlugInData? ) >
+ <!ELEMENT RmDynamicVariableValue ( RmPlugInData? ) >
+
+ <!ELEMENT RmShaderCode ( #PCDATA ) >
+
+ <!ATTLIST RmEffectWorkspace
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_EFFECT CDATA #REQUIRED
+ VALIDATION_STRING CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmEffectGroup
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDirectXEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLESEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmHLSLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ TARGET CDATA #REQUIRED
+ ENTRY_POINT CDATA #REQUIRED
+ COMPILER_FLAGS CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmGLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderConstant
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmSampler
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE_INDEX CDATA #REQUIRED
+ VERTEX_TEXTURE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmLightObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderStateBlock
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmState
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMap
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStream
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STRIDE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamChannel
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ DATA_SIZE CDATA #REQUIRED
+ DATA_TYPE CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ USAGE_INDEX CDATA #REQUIRED
+ ATTRIBUTE_NAME CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIENTATION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMapReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderableTexture
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ WIDTH CDATA #REQUIRED
+ HEIGHT CDATA #REQUIRED
+ FORMAT CDATA #REQUIRED
+ USE_VIEWPORT_DIMENSIONS ( TRUE | FALSE ) #REQUIRED
+ GENERATE_MIPMAPS ( TRUE | FALSE ) #REQUIRED
+ WIDTH_RATIO CDATA #REQUIRED
+ HEIGHT_RATIO CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderTarget
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ RENDER_TO_SCREEN ( TRUE | FALSE ) #REQUIRED
+ COLOR_CLEAR ( TRUE | FALSE ) #REQUIRED
+ DEPTH_CLEAR ( TRUE | FALSE ) #REQUIRED
+ CLEAR_COLOR_VALUE CDATA #REQUIRED
+ DEPTH_CLEAR_VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmBooleanVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmFloatVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmVectorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmMatrixVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ VALUE_4 CDATA #REQUIRED
+ VALUE_5 CDATA #REQUIRED
+ VALUE_6 CDATA #REQUIRED
+ VALUE_7 CDATA #REQUIRED
+ VALUE_8 CDATA #REQUIRED
+ VALUE_9 CDATA #REQUIRED
+ VALUE_10 CDATA #REQUIRED
+ VALUE_11 CDATA #REQUIRED
+ VALUE_12 CDATA #REQUIRED
+ VALUE_13 CDATA #REQUIRED
+ VALUE_14 CDATA #REQUIRED
+ VALUE_15 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VARIABLE_TYPE ( FLOAT | INTEGER | BOOLEAN ) #REQUIRED
+ ROWS CDATA #REQUIRED
+ COLUMNS CDATA #REQUIRED
+ FIXED_SIZE ( TRUE | FALSE ) #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariableValue
+ ROW_INDEX CDATA #REQUIRED
+ COLUMN_INDEX CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmColorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmIntegerVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmStringVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm2DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCubemapVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm3DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ LIGHT_ENABLED ( TRUE | FALSE ) #REQUIRED
+ LIGHT_TYPE ( POSITIONAL | DIRECTIONAL | SPOTLIGHT ) #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ POSITION_0 CDATA #REQUIRED
+ POSITION_1 CDATA #REQUIRED
+ POSITION_2 CDATA #REQUIRED
+ DIRECTION_0 CDATA #REQUIRED
+ DIRECTION_1 CDATA #REQUIRED
+ DIRECTION_2 CDATA #REQUIRED
+ ATTENUATION_0 CDATA #REQUIRED
+ ATTENUATION_1 CDATA #REQUIRED
+ ATTENUATION_2 CDATA #REQUIRED
+ SPOTLIGHT_THETA CDATA #REQUIRED
+ SPOTLIGHT_PHI CDATA #REQUIRED
+ RANGE CDATA #REQUIRED
+ FALLOFF CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ EMISSIVE_0 CDATA #REQUIRED
+ EMISSIVE_1 CDATA #REQUIRED
+ EMISSIVE_2 CDATA #REQUIRED
+ EMISSIVE_3 CDATA #REQUIRED
+ SPECULAR_POWER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRegistryBranch
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPlugInData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PLUGIN_GUID CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmClipboardNode
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCamera
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ CAMERA_POSITION_X CDATA #REQUIRED
+ CAMERA_POSITION_Y CDATA #REQUIRED
+ CAMERA_POSITION_Z CDATA #REQUIRED
+ LOOK_AT_VECTOR_X CDATA #REQUIRED
+ LOOK_AT_VECTOR_Y CDATA #REQUIRED
+ LOOK_AT_VECTOR_Z CDATA #REQUIRED
+ UP_VECTOR_X CDATA #REQUIRED
+ UP_VECTOR_Y CDATA #REQUIRED
+ UP_VECTOR_Z CDATA #REQUIRED
+ FOV CDATA #REQUIRED
+ NEAR_CLIP_PLANE CDATA #REQUIRED
+ FAR_CLIP_PLANE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCameraReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ USE_ACTIVE_CAMERA ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderCode
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+ <!ATTLIST RmTextDataBlock
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+]>
+<RENDER_MONKEY>
+ <RmEffectWorkspace NAME="Effect Workspace" API="" ACTIVE_EFFECT="Effect Workspace.Position" VALIDATION_STRING="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_REGISTRY" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_LOCAL" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_PLUGIN" API="" XML_VERSION="RenderMonkey 1.71"><RmTextDataBlock TYPE="TEXT"><![CDATA[
+<DockingPaneLayouts><Application_Layout><Pane-1><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Artist Editor</Title><ID>1001</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>7</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>7</LastHolder></Pane-1><Pane-2><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>0</Horiz><Pane-1>3</Pane-1><Pane-2>8</Pane-2><Panes>2</Panes></Pane-2><Pane-3><Type>2</Type><DockingCX>0</DockingCX><DockingCY>808</DockingCY><Horiz>1</Horiz><Pane-1>4</Pane-1><Pane-2>6</Pane-2><Pane-3>7</Pane-3><Panes>3</Panes></Pane-3><Pane-4><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>5</Selected><Panes>1</Panes><Pane-1>5</Pane-1></Pane-4><Pane-5><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Workspace</Title><ID>1000</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>4</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>4</LastHolder></Pane-5><Pane-6><Type>4</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY></Pane-6><Pane-7><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-7><Pane-8><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>9</Selected><Panes>1</Panes><Pane-1>9</Pane-1></Pane-8><Pane-9><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Output</Title><ID>1002</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>8</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>8</LastHolder></Pane-9><Summary><TopContainer>2</TopContainer><Client>6</Client><Panes>9</Panes></Summary></Application_Layout></DockingPaneLayouts>
+]]></RmTextDataBlock>
+ <RmRegistryBranch NAME="RmRenderStateBlockEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="54" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="70" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1283" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="434" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmStreamEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position.Stream Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="459" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="323" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="851" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="270" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewGLWindow" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EffectPlacementRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmColorEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position.u_color1" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1100" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="FloatingPoint" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="FALSE"/>
+ <RmIntegerVariable NAME="ColorType" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="LargeSize" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="TRUE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmDynamicVariableEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position.u_frequency" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1101" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="ShowSetup" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="TRUE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewDx9Window" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLESWindow" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLPreview" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmLightEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NoteEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderableTextureEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderTargetEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmShaderEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Fragment Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Pass 0]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1084" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="724" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureGenerator" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+21/1/2008 19:13:57]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey Version 1.71 (build 59)]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="XML_VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey 1.71]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="BASE_WORKSPACE_PATH" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+C:\book\ogles\Code\Chapter_13\ProceduralTextures\]]></RmTextDataBlock></RmStringVariable>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmOpenGLESEffect NAME="Position" API="OpenGL ES" ACTIVE_CAMERA="Camera">
+ <RmCamera NAME="Camera" API="" CAMERA_POSITION_X="0.934720" CAMERA_POSITION_Y="1.103003" CAMERA_POSITION_Z="-3.229657" LOOK_AT_VECTOR_X="0.001000" LOOK_AT_VECTOR_Y="0.001000" LOOK_AT_VECTOR_Z="0.001000" UP_VECTOR_X="-0.962550" UP_VECTOR_Y="0.146132" UP_VECTOR_Z="-0.228347" FOV="45.000000" NEAR_CLIP_PLANE="1.207107" FAR_CLIP_PLANE="23.414213"/>
+ <RmDynamicVariable NAME="u_frequency" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VARIABLE_TYPE="INTEGER" ROWS="1" COLUMNS="1" FIXED_SIZE="TRUE" MIN="-100" MAX="100" CLAMP="FALSE" NORMALIZE="FALSE">
+ <RmDynamicVariableValueContainer>
+ <RmDynamicVariableValue ROW_INDEX="0" COLUMN_INDEX="0" VALUE="6"/>
+ </RmDynamicVariableValueContainer>
+ </RmDynamicVariable>
+ <RmMatrixVariable NAME="u_mvpMatrix" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="-0.138832" VALUE_1="-2.092510" VALUE_2="-0.753897" VALUE_3="0.002985" VALUE_4="-2.323802" VALUE_5="0.352794" VALUE_6="-0.551279" VALUE_7="0.002531" VALUE_8="-0.278191" VALUE_9="-0.328329" VALUE_10="0.962537" VALUE_11="2.458123" VALUE_12="-0.263849" VALUE_13="-0.311402" VALUE_14="0.912914" VALUE_15="3.538502"/>
+ <RmMatrixVariable NAME="u_mvMatrix" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="View" VALUE_0="-0.062298" VALUE_1="-0.938975" VALUE_2="-0.338297" VALUE_3="0.001340" VALUE_4="-0.962550" VALUE_5="0.146132" VALUE_6="-0.228347" VALUE_7="0.001048" VALUE_8="0.263849" VALUE_9="0.311402" VALUE_10="-0.912914" VALUE_11="-3.538502" VALUE_12="0.000000" VALUE_13="0.000000" VALUE_14="0.000000" VALUE_15="1.000000"/>
+ <RmColorVariable NAME="u_color0" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="1.000000" VALUE_1="1.000000" VALUE_2="1.000000" VALUE_3="1.000000"/>
+ <RmColorVariable NAME="u_color1" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="0.000000" VALUE_1="0.000000" VALUE_2="0.000000" VALUE_3="1.000000"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="20">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="a_position"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="a_st"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="Model" API="" FILE_NAME=".\ScreenAlignedQuad.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Pass 0" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="Model" API=""/>
+ <RmRenderStateBlock NAME="Render State" API="OpenGL ES">
+ <RmState NAME="GL_CullMode" API="OpenGL ES" STATE="8" VALUE="1" USAGE="RENDER_STATE"/>
+ </RmRenderStateBlock>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+
+uniform mat4 u_mvpMatrix;
+
+attribute vec4 a_position;
+attribute vec2 a_st;
+
+varying vec2 v_st;
+
+void
+main()
+{
+ v_st = a_st;
+ gl_Position = u_mvpMatrix * a_position;
+}
+]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+#extension GL_OES_standard_derivatives:enable
+
+precision highp float;
+
+uniform int u_frequency;
+uniform vec4 u_color0;
+uniform vec4 u_color1;
+
+varying vec2 v_st;
+
+void
+main()
+{
+ vec4 color;
+ vec2 st_width;
+ vec2 fuzz;
+ vec2 pmod;
+ float fuzz_max;
+
+ // determine the filter width
+ st_width = fwidth(v_st);
+
+ // calculate the fuzziness taking normal into account
+ fuzz = st_width * float(u_frequency) * 2.0;
+
+ fuzz_max = max(fuzz.s, fuzz.t);
+
+ // calculate position in the checkerboard pattern
+ pmod = fract(v_st * float(u_frequency));
+
+ // if the filter width is small enough, compute the pattern color
+ if (fuzz_max <= 0.5)
+ {
+ vec2 p = smoothstep(vec2(0.5), fuzz + vec2(0.5), pmod) + (1.0 - smoothstep(vec2(0.0), fuzz, pmod));
+
+ color = mix(u_color0, u_color1, p.x * p.y + (1.0 - p.x) * (1.0 - p.y));
+
+ // gradually fade in the average color when we get close to the limit
+ color = mix(color, (u_color0 + u_color1)/2.0, smoothstep(0.125, 0.5, fuzz_max));
+ }
+ else
+ {
+ // otherwise, use only the average color
+ color = (u_color0 + u_color1)/2.0;
+ }
+
+ gl_FragColor = color;
+}
+]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmShaderConstant NAME="u_color0" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_color1" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_frequency" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_mvpMatrix" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ </RmEffectWorkspace>
+</RENDER_MONKEY>
diff --git a/third_party/gles2_book/Chapter_13/ProceduralTextures/ProceduralTextures.rfx b/third_party/gles2_book/Chapter_13/ProceduralTextures/ProceduralTextures.rfx
new file mode 100644
index 0000000..f60300f
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ProceduralTextures/ProceduralTextures.rfx
@@ -0,0 +1,1109 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE RENDER_MONKEY [
+ <!ELEMENT RENDER_MONKEY
+ (
+ RmEffectWorkspace |
+ RmRegistryBranch |
+ RmClipboardNode
+ )?>
+
+ <!ELEMENT RmEffectWorkspace
+ (
+ RmRegistryBranch?,
+ RmPlugInData?,
+ RmStringVariable*,
+ (
+ ( RmDirectXEffect, RmOpenGLEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLEffect, RmDirectXEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLESEffect, RmDirectXEffect?, RmOpenGLEffect? )
+ )?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmEffectGroup
+ )*
+ )>
+
+ <!ELEMENT RmEffectGroup
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData
+ )*
+ )>
+
+ <!ELEMENT RmDirectXEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLESEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLESPass
+ )*
+ )>
+
+ <!ELEMENT RmPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ (
+ ( RmHLSLShader | RmShader ),
+ ( RmShader | RmHLSLShader )?
+ )
+ )?,
+ RmRenderTarget*,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject
+ )*
+ )>
+
+ <!ELEMENT RmGLPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLShader, RmGLShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLESPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLESShader, RmGLESShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant
+ )*
+ )>
+
+ <!ELEMENT RmHLSLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmGLESShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmTextureObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmTextureReference?,
+ RmState*
+ )>
+
+ <!ELEMENT RmLightObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmLightReference?
+ )>
+
+ <!ELEMENT RmMaterialObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmMaterialReference?
+ )>
+
+ <!ELEMENT RmRenderStateBlock
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmState
+ )*
+ )>
+
+ <!ELEMENT RmStreamMap
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmStream
+ )*
+ )>
+
+ <!ELEMENT RmStream ( RmPlugInData?, RmStreamChannel* )>
+
+ <!ELEMENT RmModelData ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmTextureReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmLightReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmMaterialReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmCameraReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmModelReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmStreamMapReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderableTexture ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderTarget ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmBooleanVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmFloatVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmVectorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMatrixVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmColorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmIntegerVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm2DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCubemapVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm3DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmLightVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMaterialVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCamera ( RmPlugInData?, RmStringVariable* )>
+
+ <!ELEMENT RmStringVariable ( RmTextDataBlock, RmPlugInData? )>
+
+ <!ELEMENT RmDynamicVariable
+ (
+ RmDynamicVariableValueContainer,
+ RmPlugInData?,
+ RmStringVariable?
+ )>
+
+ <!ELEMENT RmDynamicVariableValueContainer
+ (
+ RmPlugInData?,
+ RmDynamicVariableValue*
+ )>
+
+ <!ELEMENT RmTextDataBlock ( #PCDATA ) >
+
+ <!ELEMENT RmRegistryBranch
+ (
+ RmTextDataBlock?,
+ (
+ RmRegistryBranch |
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable
+ )*
+ )>
+
+ <!ELEMENT RmPlugInData
+ (
+ RmTextDataBlock?,
+ (
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable
+ )*
+ )>
+
+ <!ELEMENT RmClipboardNode
+ (
+ RmTextDataBlock?,
+ (
+ RmEffectWorkspace |
+ RmEffectGroup |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmPass |
+ RmGLPass |
+ RmGLESPass |
+ RmShader |
+ RmHLSLShader |
+ RmGLShader |
+ RmGLESShader |
+ RmShaderConstant |
+ RmSampler |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmRenderStateBlock |
+ RmState |
+ RmStreamMap |
+ RmStream |
+ RmStreamChannel |
+ RmModelData |
+ RmTextureReference |
+ RmLightReference |
+ RmMaterialReference |
+ RmModelReference |
+ RmStreamMapReference |
+ RmRenderableTexture |
+ RmRenderTarget |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmDynamicVariableValue |
+ RmColorVariable |
+ RmIntegerVariable |
+ RmStringVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRegistryBranch |
+ RmPlugInData |
+ RmCamera |
+ RmCameraReference
+ )*
+ )>
+
+ <!ELEMENT RmStreamChannel ( RmPlugInData? ) >
+ <!ELEMENT RmShaderConstant ( RmPlugInData? ) >
+ <!ELEMENT RmSampler ( RmPlugInData? ) >
+ <!ELEMENT RmState ( RmPlugInData? ) >
+ <!ELEMENT RmDynamicVariableValue ( RmPlugInData? ) >
+
+ <!ELEMENT RmShaderCode ( #PCDATA ) >
+
+ <!ATTLIST RmEffectWorkspace
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_EFFECT CDATA #REQUIRED
+ VALIDATION_STRING CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmEffectGroup
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDirectXEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLESEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmHLSLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ TARGET CDATA #REQUIRED
+ ENTRY_POINT CDATA #REQUIRED
+ COMPILER_FLAGS CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmGLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderConstant
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmSampler
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE_INDEX CDATA #REQUIRED
+ VERTEX_TEXTURE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmLightObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderStateBlock
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmState
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMap
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStream
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STRIDE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamChannel
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ DATA_SIZE CDATA #REQUIRED
+ DATA_TYPE CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ USAGE_INDEX CDATA #REQUIRED
+ ATTRIBUTE_NAME CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIENTATION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMapReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderableTexture
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ WIDTH CDATA #REQUIRED
+ HEIGHT CDATA #REQUIRED
+ FORMAT CDATA #REQUIRED
+ USE_VIEWPORT_DIMENSIONS ( TRUE | FALSE ) #REQUIRED
+ GENERATE_MIPMAPS ( TRUE | FALSE ) #REQUIRED
+ WIDTH_RATIO CDATA #REQUIRED
+ HEIGHT_RATIO CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderTarget
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ RENDER_TO_SCREEN ( TRUE | FALSE ) #REQUIRED
+ COLOR_CLEAR ( TRUE | FALSE ) #REQUIRED
+ DEPTH_CLEAR ( TRUE | FALSE ) #REQUIRED
+ CLEAR_COLOR_VALUE CDATA #REQUIRED
+ DEPTH_CLEAR_VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmBooleanVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmFloatVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmVectorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmMatrixVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ VALUE_4 CDATA #REQUIRED
+ VALUE_5 CDATA #REQUIRED
+ VALUE_6 CDATA #REQUIRED
+ VALUE_7 CDATA #REQUIRED
+ VALUE_8 CDATA #REQUIRED
+ VALUE_9 CDATA #REQUIRED
+ VALUE_10 CDATA #REQUIRED
+ VALUE_11 CDATA #REQUIRED
+ VALUE_12 CDATA #REQUIRED
+ VALUE_13 CDATA #REQUIRED
+ VALUE_14 CDATA #REQUIRED
+ VALUE_15 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VARIABLE_TYPE ( FLOAT | INTEGER | BOOLEAN ) #REQUIRED
+ ROWS CDATA #REQUIRED
+ COLUMNS CDATA #REQUIRED
+ FIXED_SIZE ( TRUE | FALSE ) #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariableValue
+ ROW_INDEX CDATA #REQUIRED
+ COLUMN_INDEX CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmColorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmIntegerVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmStringVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm2DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCubemapVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm3DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ LIGHT_ENABLED ( TRUE | FALSE ) #REQUIRED
+ LIGHT_TYPE ( POSITIONAL | DIRECTIONAL | SPOTLIGHT ) #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ POSITION_0 CDATA #REQUIRED
+ POSITION_1 CDATA #REQUIRED
+ POSITION_2 CDATA #REQUIRED
+ DIRECTION_0 CDATA #REQUIRED
+ DIRECTION_1 CDATA #REQUIRED
+ DIRECTION_2 CDATA #REQUIRED
+ ATTENUATION_0 CDATA #REQUIRED
+ ATTENUATION_1 CDATA #REQUIRED
+ ATTENUATION_2 CDATA #REQUIRED
+ SPOTLIGHT_THETA CDATA #REQUIRED
+ SPOTLIGHT_PHI CDATA #REQUIRED
+ RANGE CDATA #REQUIRED
+ FALLOFF CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ EMISSIVE_0 CDATA #REQUIRED
+ EMISSIVE_1 CDATA #REQUIRED
+ EMISSIVE_2 CDATA #REQUIRED
+ EMISSIVE_3 CDATA #REQUIRED
+ SPECULAR_POWER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRegistryBranch
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPlugInData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PLUGIN_GUID CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmClipboardNode
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCamera
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ CAMERA_POSITION_X CDATA #REQUIRED
+ CAMERA_POSITION_Y CDATA #REQUIRED
+ CAMERA_POSITION_Z CDATA #REQUIRED
+ LOOK_AT_VECTOR_X CDATA #REQUIRED
+ LOOK_AT_VECTOR_Y CDATA #REQUIRED
+ LOOK_AT_VECTOR_Z CDATA #REQUIRED
+ UP_VECTOR_X CDATA #REQUIRED
+ UP_VECTOR_Y CDATA #REQUIRED
+ UP_VECTOR_Z CDATA #REQUIRED
+ FOV CDATA #REQUIRED
+ NEAR_CLIP_PLANE CDATA #REQUIRED
+ FAR_CLIP_PLANE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCameraReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ USE_ACTIVE_CAMERA ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderCode
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+ <!ATTLIST RmTextDataBlock
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+]>
+<RENDER_MONKEY>
+ <RmEffectWorkspace NAME="Effect Workspace" API="" ACTIVE_EFFECT="Effect Workspace.Position" VALIDATION_STRING="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_REGISTRY" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_LOCAL" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_PLUGIN" API="" XML_VERSION="RenderMonkey 1.71"><RmTextDataBlock TYPE="TEXT"><![CDATA[
+<DockingPaneLayouts><Application_Layout><Pane-1><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Artist Editor</Title><ID>1001</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>7</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>7</LastHolder></Pane-1><Pane-2><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>0</Horiz><Pane-1>3</Pane-1><Pane-2>8</Pane-2><Panes>2</Panes></Pane-2><Pane-3><Type>2</Type><DockingCX>0</DockingCX><DockingCY>808</DockingCY><Horiz>1</Horiz><Pane-1>4</Pane-1><Pane-2>6</Pane-2><Pane-3>7</Pane-3><Panes>3</Panes></Pane-3><Pane-4><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>5</Selected><Panes>1</Panes><Pane-1>5</Pane-1></Pane-4><Pane-5><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Workspace</Title><ID>1000</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>4</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>4</LastHolder></Pane-5><Pane-6><Type>4</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY></Pane-6><Pane-7><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-7><Pane-8><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>9</Selected><Panes>1</Panes><Pane-1>9</Pane-1></Pane-8><Pane-9><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Output</Title><ID>1002</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>8</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>8</LastHolder></Pane-9><Summary><TopContainer>2</TopContainer><Client>6</Client><Panes>9</Panes></Summary></Application_Layout></DockingPaneLayouts>
+]]></RmTextDataBlock>
+ <RmRegistryBranch NAME="RmRenderStateBlockEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="54" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="70" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1283" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="434" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmStreamEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position.Stream Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="459" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="323" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="851" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="270" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewGLWindow" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EffectPlacementRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="350" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmColorEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position.u_color1" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1100" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="FloatingPoint" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="FALSE"/>
+ <RmIntegerVariable NAME="ColorType" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="LargeSize" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="TRUE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmDynamicVariableEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position.u_frequency" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="DockPaneID" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1101" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmBooleanVariable NAME="ShowSetup" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="TRUE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewDx9Window" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLESWindow" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLPreview" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmLightEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NoteEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderableTextureEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderTargetEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmShaderEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Position" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Fragment Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Pass 0]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="967" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="718" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureGenerator" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+20/1/2008 22:52:27]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey Version 1.71 (build 59)]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="XML_VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey 1.71]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="BASE_WORKSPACE_PATH" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+C:\book\ogles\Code\Chapter_13\ProceduralTextures\]]></RmTextDataBlock></RmStringVariable>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmOpenGLESEffect NAME="Position" API="OpenGL ES" ACTIVE_CAMERA="Camera">
+ <RmCamera NAME="Camera" API="" CAMERA_POSITION_X="1.482474" CAMERA_POSITION_Y="-1.227030" CAMERA_POSITION_Z="-2.968942" LOOK_AT_VECTOR_X="0.001000" LOOK_AT_VECTOR_Y="0.001000" LOOK_AT_VECTOR_Z="0.001000" UP_VECTOR_X="-0.087063" UP_VECTOR_Y="0.904525" UP_VECTOR_Z="-0.417437" FOV="45.000000" NEAR_CLIP_PLANE="1.207107" FAR_CLIP_PLANE="23.414213"/>
+ <RmDynamicVariable NAME="u_frequency" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VARIABLE_TYPE="INTEGER" ROWS="1" COLUMNS="1" FIXED_SIZE="TRUE" MIN="-100" MAX="100" CLAMP="FALSE" NORMALIZE="FALSE">
+ <RmDynamicVariableValueContainer>
+ <RmDynamicVariableValue ROW_INDEX="0" COLUMN_INDEX="0" VALUE="6"/>
+ </RmDynamicVariableValueContainer>
+ </RmDynamicVariable>
+ <RmMatrixVariable NAME="u_mvpMatrix" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="-2.014508" VALUE_1="-0.552268" VALUE_2="-0.776526" VALUE_3="0.003343" VALUE_4="-0.210189" VALUE_5="2.183717" VALUE_6="-1.007783" VALUE_7="-0.000962" VALUE_8="-0.441388" VALUE_9="0.365878" VALUE_10="0.884861" VALUE_11="2.457668" VALUE_12="-0.418633" VALUE_13="0.347015" VALUE_14="0.839242" VALUE_15="3.538071"/>
+ <RmColorVariable NAME="u_color1" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="0.000000" VALUE_1="0.000000" VALUE_2="0.000000" VALUE_3="1.000000"/>
+ <RmColorVariable NAME="u_color0" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" VALUE_0="1.000000" VALUE_1="1.000000" VALUE_2="1.000000" VALUE_3="1.000000"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="20">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="a_position"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="a_st"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="Model" API="" FILE_NAME=".\ScreenAlignedQuad.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Pass 0" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="Model" API=""/>
+ <RmRenderStateBlock NAME="Render State" API="OpenGL ES">
+ <RmState NAME="GL_CullMode" API="OpenGL ES" STATE="8" VALUE="1" USAGE="RENDER_STATE"/>
+ </RmRenderStateBlock>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+
+uniform mat4 u_mvpMatrix;
+
+attribute vec4 a_position;
+attribute vec2 a_st;
+
+varying vec2 v_st;
+
+void
+main()
+{
+ v_st = a_st;
+ gl_Position = u_mvpMatrix * a_position;
+}
+]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+#extension GL_OES_standard_derivatives:enable
+
+precision highp float;
+
+uniform int u_frequency;
+uniform vec4 u_color0;
+uniform vec4 u_color1;
+
+varying vec2 v_st;
+
+void
+main()
+{
+#if 1
+ float s, t, delta;
+
+ s = mod(floor(v_st.x * float(u_frequency * 2)), 2.0);
+ t = mod(floor(v_st.y * float(u_frequency * 2)), 2.0);
+ delta = abs(s - t);
+
+ gl_FragColor = mix(u_color1, u_color0, delta);
+#else
+ vec4 color;
+ vec2 st_width;
+ vec2 fuzz;
+ vec2 pmod;
+ float fuzz_max;
+
+ st_width = fwidth(v_st);
+ fuzz = st_width * float(u_frequency) * 2.0;
+ fuzz_max = max(fuzz.s, fuzz.t);
+ pmod = fract(v_st * float(u_frequency));
+
+ if (fuzz_max <= 0.5)
+ {
+ vec2 p = smoothstep(vec2(0.5), fuzz + vec2(0.5), pmod) + (1.0 - smoothstep(vec2(0.0), fuzz, pmod));
+
+ color = mix(u_color0, u_color1, p.x * p.y + (1.0 - p.x) * (1.0 - p.y));
+
+ color = mix(color, (u_color0 + u_color1)/2.0, smoothstep(0.125, 0.5, fuzz_max));
+ }
+ else
+ {
+ color = (u_color0 + u_color1)/2.0;
+ }
+
+ gl_FragColor = color;
+#endif
+}
+]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmShaderConstant NAME="u_color0" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_color1" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_frequency" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_mvpMatrix" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ </RmEffectWorkspace>
+</RENDER_MONKEY>
diff --git a/third_party/gles2_book/Chapter_13/ProceduralTextures/ScreenAlignedQuad.3ds b/third_party/gles2_book/Chapter_13/ProceduralTextures/ScreenAlignedQuad.3ds
new file mode 100644
index 0000000..619124b
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ProceduralTextures/ScreenAlignedQuad.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/ProceduralTextures/checker.fs b/third_party/gles2_book/Chapter_13/ProceduralTextures/checker.fs
new file mode 100644
index 0000000..305eb46
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ProceduralTextures/checker.fs
@@ -0,0 +1,21 @@
+#ifdef GL_ES
+precision highp float;
+#endif
+
+uniform int frequency;
+uniform vec4 color0;
+uniform vec4 color1;
+
+varying vec2 v_st;
+
+void
+main()
+{
+ float s, t, delta;
+
+ s = mod(floor(v_st.x * float(frequency * 2)), 2.0);
+ t = mod(floor(v_st.y * float(frequency * 2)), 2.0);
+ delta = abs(s - t);
+
+ gl_FragColor = mix(color1, color0, delta);
+}
diff --git a/third_party/gles2_book/Chapter_13/ProceduralTextures/checker.tiff b/third_party/gles2_book/Chapter_13/ProceduralTextures/checker.tiff
new file mode 100644
index 0000000..767b030
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ProceduralTextures/checker.tiff
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/ProceduralTextures/checker.vs b/third_party/gles2_book/Chapter_13/ProceduralTextures/checker.vs
new file mode 100644
index 0000000..88375ba
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ProceduralTextures/checker.vs
@@ -0,0 +1,14 @@
+
+uniform mat4 mvp_matrix;
+
+attribute vec4 a_position;
+attribute vec2 a_st;
+
+varying vec2 v_st;
+
+void
+main()
+{
+ v_st = a_st;
+ gl_Position = mvp_matrix * a_position;
+}
diff --git a/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Corona.tga b/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Corona.tga
new file mode 100644
index 0000000..19dba88
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Corona.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/ProjectiveSpotlight.rfx b/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/ProjectiveSpotlight.rfx
new file mode 100644
index 0000000..12f85f6
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/ProjectiveSpotlight.rfx
@@ -0,0 +1,1133 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!DOCTYPE RENDER_MONKEY [
+ <!ELEMENT RENDER_MONKEY
+ (
+ RmEffectWorkspace |
+ RmRegistryBranch |
+ RmClipboardNode
+ )?>
+
+ <!ELEMENT RmEffectWorkspace
+ (
+ RmRegistryBranch?,
+ RmPlugInData?,
+ RmStringVariable*,
+ (
+ ( RmDirectXEffect, RmOpenGLEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLEffect, RmDirectXEffect?, RmOpenGLESEffect? ) |
+ ( RmOpenGLESEffect, RmDirectXEffect?, RmOpenGLEffect? )
+ )?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmEffectGroup
+ )*
+ )>
+
+ <!ELEMENT RmEffectGroup
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData
+ )*
+ )>
+
+ <!ELEMENT RmDirectXEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLPass
+ )*
+ )>
+
+ <!ELEMENT RmOpenGLESEffect
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmCamera |
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRenderableTexture |
+ RmStreamMap |
+ RmModelData |
+ RmGLESPass
+ )*
+ )>
+
+ <!ELEMENT RmPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ (
+ ( RmHLSLShader | RmShader ),
+ ( RmShader | RmHLSLShader )?
+ )
+ )?,
+ RmRenderTarget*,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject
+ )*
+ )>
+
+ <!ELEMENT RmGLPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLShader, RmGLShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLESPass
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmCameraReference?,
+ RmModelReference?,
+ RmRenderStateBlock?,
+ (
+ ( RmGLESShader, RmGLESShader? )
+ )?,
+ RmRenderTarget?,
+ RmStreamMapReference?,
+ (
+ RmBooleanVariable |
+ RmIntegerVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmColorVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant
+ )*
+ )>
+
+ <!ELEMENT RmHLSLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmShaderConstant |
+ RmSampler
+ )*
+ )>
+
+ <!ELEMENT RmGLShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmGLESShader
+ (
+ RmShaderCode,
+ RmPlugInData?,
+ (
+ RmStringVariable
+ )*
+ )>
+
+ <!ELEMENT RmTextureObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmTextureReference?,
+ RmState*
+ )>
+
+ <!ELEMENT RmLightObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmLightReference?
+ )>
+
+ <!ELEMENT RmMaterialObject
+ (
+ RmPlugInData?,
+ RmStringVariable*,
+ RmMaterialReference?
+ )>
+
+ <!ELEMENT RmRenderStateBlock
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmState
+ )*
+ )>
+
+ <!ELEMENT RmStreamMap
+ (
+ RmPlugInData?,
+ (
+ RmStringVariable |
+ RmStream
+ )*
+ )>
+
+ <!ELEMENT RmStream ( RmPlugInData?, RmStreamChannel* )>
+
+ <!ELEMENT RmModelData ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmTextureReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmLightReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmMaterialReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmCameraReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmModelReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmStreamMapReference ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderableTexture ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmRenderTarget ( RmPlugInData?, RmStringVariable* )>
+ <!ELEMENT RmBooleanVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmFloatVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmVectorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMatrixVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmColorVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmIntegerVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm2DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCubemapVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT Rm3DTextureVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmLightVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmMaterialVariable ( RmPlugInData?, RmStringVariable? )>
+ <!ELEMENT RmCamera ( RmPlugInData?, RmStringVariable* )>
+
+ <!ELEMENT RmStringVariable ( RmTextDataBlock, RmPlugInData? )>
+
+ <!ELEMENT RmDynamicVariable
+ (
+ RmDynamicVariableValueContainer,
+ RmPlugInData?,
+ RmStringVariable?
+ )>
+
+ <!ELEMENT RmDynamicVariableValueContainer
+ (
+ RmPlugInData?,
+ RmDynamicVariableValue*
+ )>
+
+ <!ELEMENT RmTextDataBlock ( #PCDATA ) >
+
+ <!ELEMENT RmRegistryBranch
+ (
+ RmTextDataBlock?,
+ (
+ RmRegistryBranch |
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable
+ )*
+ )>
+
+ <!ELEMENT RmPlugInData
+ (
+ RmTextDataBlock?,
+ (
+ RmStringVariable |
+ RmIntegerVariable |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable
+ )*
+ )>
+
+ <!ELEMENT RmClipboardNode
+ (
+ RmTextDataBlock?,
+ (
+ RmEffectWorkspace |
+ RmEffectGroup |
+ RmDirectXEffect |
+ RmOpenGLEffect |
+ RmOpenGLESEffect |
+ RmPass |
+ RmGLPass |
+ RmGLESPass |
+ RmShader |
+ RmHLSLShader |
+ RmGLShader |
+ RmGLESShader |
+ RmShaderConstant |
+ RmSampler |
+ RmTextureObject |
+ RmLightObject |
+ RmMaterialObject |
+ RmRenderStateBlock |
+ RmState |
+ RmStreamMap |
+ RmStream |
+ RmStreamChannel |
+ RmModelData |
+ RmTextureReference |
+ RmLightReference |
+ RmMaterialReference |
+ RmModelReference |
+ RmStreamMapReference |
+ RmRenderableTexture |
+ RmRenderTarget |
+ RmBooleanVariable |
+ RmFloatVariable |
+ RmVectorVariable |
+ RmMatrixVariable |
+ RmDynamicVariable |
+ RmDynamicVariableValue |
+ RmColorVariable |
+ RmIntegerVariable |
+ RmStringVariable |
+ Rm2DTextureVariable |
+ RmCubemapVariable |
+ Rm3DTextureVariable |
+ RmLightVariable |
+ RmMaterialVariable |
+ RmRegistryBranch |
+ RmPlugInData |
+ RmCamera |
+ RmCameraReference
+ )*
+ )>
+
+ <!ELEMENT RmStreamChannel ( RmPlugInData? ) >
+ <!ELEMENT RmShaderConstant ( RmPlugInData? ) >
+ <!ELEMENT RmSampler ( RmPlugInData? ) >
+ <!ELEMENT RmState ( RmPlugInData? ) >
+ <!ELEMENT RmDynamicVariableValue ( RmPlugInData? ) >
+
+ <!ELEMENT RmShaderCode ( #PCDATA ) >
+
+ <!ATTLIST RmEffectWorkspace
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_EFFECT CDATA #REQUIRED
+ VALIDATION_STRING CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmEffectGroup
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDirectXEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmOpenGLESEffect
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ACTIVE_CAMERA CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESPass
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PASS_INDEX CDATA #REQUIRED
+ ENABLED ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmHLSLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ TARGET CDATA #REQUIRED
+ ENTRY_POINT CDATA #REQUIRED
+ COMPILER_FLAGS CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmGLShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmGLESShader
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PIXEL_SHADER ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderConstant
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmSampler
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE_INDEX CDATA #REQUIRED
+ VERTEX_TEXTURE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmLightObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialObject
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderStateBlock
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmState
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STATE CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMap
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStream
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ STRIDE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamChannel
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ DATA_SIZE CDATA #REQUIRED
+ DATA_TYPE CDATA #REQUIRED
+ REGISTER CDATA #REQUIRED
+ USAGE CDATA #REQUIRED
+ USAGE_INDEX CDATA #REQUIRED
+ ATTRIBUTE_NAME CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIENTATION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmTextureReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmModelReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmStreamMapReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderableTexture
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ WIDTH CDATA #REQUIRED
+ HEIGHT CDATA #REQUIRED
+ FORMAT CDATA #REQUIRED
+ USE_VIEWPORT_DIMENSIONS ( TRUE | FALSE ) #REQUIRED
+ GENERATE_MIPMAPS ( TRUE | FALSE ) #REQUIRED
+ WIDTH_RATIO CDATA #REQUIRED
+ HEIGHT_RATIO CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRenderTarget
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ INDEX CDATA #REQUIRED
+ RENDER_TO_SCREEN ( TRUE | FALSE ) #REQUIRED
+ COLOR_CLEAR ( TRUE | FALSE ) #REQUIRED
+ DEPTH_CLEAR ( TRUE | FALSE ) #REQUIRED
+ CLEAR_COLOR_VALUE CDATA #REQUIRED
+ DEPTH_CLEAR_VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmBooleanVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmFloatVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmVectorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmMatrixVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ VALUE_4 CDATA #REQUIRED
+ VALUE_5 CDATA #REQUIRED
+ VALUE_6 CDATA #REQUIRED
+ VALUE_7 CDATA #REQUIRED
+ VALUE_8 CDATA #REQUIRED
+ VALUE_9 CDATA #REQUIRED
+ VALUE_10 CDATA #REQUIRED
+ VALUE_11 CDATA #REQUIRED
+ VALUE_12 CDATA #REQUIRED
+ VALUE_13 CDATA #REQUIRED
+ VALUE_14 CDATA #REQUIRED
+ VALUE_15 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VARIABLE_TYPE ( FLOAT | INTEGER | BOOLEAN ) #REQUIRED
+ ROWS CDATA #REQUIRED
+ COLUMNS CDATA #REQUIRED
+ FIXED_SIZE ( TRUE | FALSE ) #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ NORMALIZE ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmDynamicVariableValue
+ ROW_INDEX CDATA #REQUIRED
+ COLUMN_INDEX CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmColorVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE_0 CDATA #REQUIRED
+ VALUE_1 CDATA #REQUIRED
+ VALUE_2 CDATA #REQUIRED
+ VALUE_3 CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmIntegerVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ VALUE CDATA #REQUIRED
+ MIN CDATA #REQUIRED
+ MAX CDATA #REQUIRED
+ CLAMP ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmStringVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm2DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCubemapVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST Rm3DTextureVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ FILE_NAME CDATA #REQUIRED
+ ORIGIN CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmLightVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ LIGHT_ENABLED ( TRUE | FALSE ) #REQUIRED
+ LIGHT_TYPE ( POSITIONAL | DIRECTIONAL | SPOTLIGHT ) #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ POSITION_0 CDATA #REQUIRED
+ POSITION_1 CDATA #REQUIRED
+ POSITION_2 CDATA #REQUIRED
+ DIRECTION_0 CDATA #REQUIRED
+ DIRECTION_1 CDATA #REQUIRED
+ DIRECTION_2 CDATA #REQUIRED
+ ATTENUATION_0 CDATA #REQUIRED
+ ATTENUATION_1 CDATA #REQUIRED
+ ATTENUATION_2 CDATA #REQUIRED
+ SPOTLIGHT_THETA CDATA #REQUIRED
+ SPOTLIGHT_PHI CDATA #REQUIRED
+ RANGE CDATA #REQUIRED
+ FALLOFF CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmMaterialVariable
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ ARTIST_EDITABLE ( TRUE | FALSE ) #REQUIRED
+ VARIABLE_SEMANTIC CDATA #REQUIRED
+ AMBIENT_0 CDATA #REQUIRED
+ AMBIENT_1 CDATA #REQUIRED
+ AMBIENT_2 CDATA #REQUIRED
+ AMBIENT_3 CDATA #REQUIRED
+ DIFFUSE_0 CDATA #REQUIRED
+ DIFFUSE_1 CDATA #REQUIRED
+ DIFFUSE_2 CDATA #REQUIRED
+ DIFFUSE_3 CDATA #REQUIRED
+ SPECULAR_0 CDATA #REQUIRED
+ SPECULAR_1 CDATA #REQUIRED
+ SPECULAR_2 CDATA #REQUIRED
+ SPECULAR_3 CDATA #REQUIRED
+ EMISSIVE_0 CDATA #REQUIRED
+ EMISSIVE_1 CDATA #REQUIRED
+ EMISSIVE_2 CDATA #REQUIRED
+ EMISSIVE_3 CDATA #REQUIRED
+ SPECULAR_POWER CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmRegistryBranch
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmPlugInData
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ PLUGIN_GUID CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmClipboardNode
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ XML_VERSION CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCamera
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ CAMERA_POSITION_X CDATA #REQUIRED
+ CAMERA_POSITION_Y CDATA #REQUIRED
+ CAMERA_POSITION_Z CDATA #REQUIRED
+ LOOK_AT_VECTOR_X CDATA #REQUIRED
+ LOOK_AT_VECTOR_Y CDATA #REQUIRED
+ LOOK_AT_VECTOR_Z CDATA #REQUIRED
+ UP_VECTOR_X CDATA #REQUIRED
+ UP_VECTOR_Y CDATA #REQUIRED
+ UP_VECTOR_Z CDATA #REQUIRED
+ FOV CDATA #REQUIRED
+ NEAR_CLIP_PLANE CDATA #REQUIRED
+ FAR_CLIP_PLANE CDATA #REQUIRED
+ >
+
+ <!ATTLIST RmCameraReference
+ NAME CDATA #REQUIRED
+ API CDATA #REQUIRED
+ USE_ACTIVE_CAMERA ( TRUE | FALSE ) #REQUIRED
+ >
+
+ <!ATTLIST RmShaderCode
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+ <!ATTLIST RmTextDataBlock
+ TYPE ( TEXT ) #REQUIRED
+ >
+
+]>
+<RENDER_MONKEY>
+ <RmEffectWorkspace NAME="Effect Workspace" API="" ACTIVE_EFFECT="Effect Workspace.ProjectiveSpotlight" VALIDATION_STRING="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_REGISTRY" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_LOCAL" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="RM_PLUGIN" API="" XML_VERSION="RenderMonkey 1.71"><RmTextDataBlock TYPE="TEXT"><![CDATA[
+<DockingPaneLayouts><Application_Layout><Pane-1><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Artist Editor</Title><ID>1001</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>14</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>14</LastHolder></Pane-1><Pane-2><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_blurStep</Title><ID>1100</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>8</DockingHolder><FloatingHolder>19</FloatingHolder><LastHolder>19</LastHolder></Pane-2><Pane-3><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>1</Horiz><Pane-1>4</Pane-1><Pane-2>5</Pane-2><Pane-3>6</Pane-3><Pane-4>7</Pane-4><Pane-5>8</Pane-5><Pane-6>9</Pane-6><Panes>6</Panes></Pane-3><Pane-4><Type>1</Type><DockingCX>434</DockingCX><DockingCY>212</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-4><Pane-5><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-5><Pane-6><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-6><Pane-7><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-7><Pane-8><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-8><Pane-9><Type>2</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><Horiz>0</Horiz><Pane-1>10</Pane-1><Pane-2>15</Pane-2><Panes>2</Panes></Pane-9><Pane-10><Type>2</Type><DockingCX>0</DockingCX><DockingCY>641</DockingCY><Horiz>1</Horiz><Pane-1>11</Pane-1><Pane-2>13</Pane-2><Pane-3>14</Pane-3><Panes>3</Panes></Pane-10><Pane-11><Type>1</Type><DockingCX>336</DockingCX><DockingCY>250</DockingCY><Selected>12</Selected><Panes>1</Panes><Pane-1>12</Pane-1></Pane-11><Pane-12><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Workspace</Title><ID>1000</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>11</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>11</LastHolder></Pane-12><Pane-13><Type>4</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY></Pane-13><Pane-14><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-14><Pane-15><Type>1</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Selected>16</Selected><Panes>1</Panes><Pane-1>16</Pane-1></Pane-15><Pane-16><Type>0</Type><DockingCX>250</DockingCX><DockingCY>250</DockingCY><Title>Output</Title><ID>1002</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>15</DockingHolder><FloatingHolder>0</FloatingHolder><LastHolder>15</LastHolder></Pane-16><Pane-17><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>18</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-17><Pane-18><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>19</Pane-1><Panes>1</Panes></Pane-18><Pane-19><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-19><Pane-20><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_blurStep</Title><ID>1101</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>7</DockingHolder><FloatingHolder>23</FloatingHolder><LastHolder>23</LastHolder></Pane-20><Pane-21><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>22</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-21><Pane-22><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>23</Pane-1><Panes>1</Panes></Pane-22><Pane-23><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-23><Pane-24><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_blurStep</Title><ID>1102</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>6</DockingHolder><FloatingHolder>27</FloatingHolder><LastHolder>27</LastHolder></Pane-24><Pane-25><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>26</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-25><Pane-26><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>27</Pane-1><Panes>1</Panes></Pane-26><Pane-27><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-27><Pane-28><Type>0</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Title>u_blurStep</Title><ID>1103</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>5</DockingHolder><FloatingHolder>31</FloatingHolder><LastHolder>31</LastHolder></Pane-28><Pane-29><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>30</TopContaner><WindowRectTopPos>32</WindowRectTopPos><WindowRectBottomPos>160</WindowRectBottomPos><WindowRectLeftPos>0</WindowRectLeftPos><WindowRectRightPos>566</WindowRectRightPos></Pane-29><Pane-30><Type>2</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Horiz>1</Horiz><Pane-1>31</Pane-1><Panes>1</Panes></Pane-30><Pane-31><Type>1</Type><DockingCX>566</DockingCX><DockingCY>128</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-31><Pane-32><Type>3</Type><DockingCX>0</DockingCX><DockingCY>0</DockingCY><TopContaner>33</TopContaner><WindowRectTopPos>557</WindowRectTopPos><WindowRectBottomPos>769</WindowRectBottomPos><WindowRectLeftPos>386</WindowRectLeftPos><WindowRectRightPos>820</WindowRectRightPos></Pane-32><Pane-33><Type>2</Type><DockingCX>434</DockingCX><DockingCY>212</DockingCY><Horiz>1</Horiz><Pane-1>34</Pane-1><Panes>1</Panes></Pane-33><Pane-34><Type>1</Type><DockingCX>434</DockingCX><DockingCY>212</DockingCY><Selected>0</Selected><Panes>0</Panes></Pane-34><Pane-35><Type>0</Type><DockingCX>434</DockingCX><DockingCY>212</DockingCY><Title>u_lightPos</Title><ID>1104</ID><IconID>-1</IconID><Options>0</Options><DockingHolder>4</DockingHolder><FloatingHolder>34</FloatingHolder><LastHolder>34</LastHolder></Pane-35><Summary><TopContainer>3</TopContainer><Client>13</Client><Panes>35</Panes></Summary></Application_Layout></DockingPaneLayouts>
+]]></RmTextDataBlock>
+ <RmRegistryBranch NAME="RmPreviewDx9Window" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLESWindow" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmPreviewGLWindow" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EffectPlacementRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.ProjectiveSpotlight" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="39" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="2" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="483" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="483" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmPreviewGLPreview" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="RmLightEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NoteEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderableTextureEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderTargetEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmRenderStateBlockEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureObjectEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.ProjectiveSpotlight.Render Object.spotLight" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.ProjectiveSpotlight" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="431" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="36" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1063" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="514" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmTextureGenerator" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="EditNodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmShaderEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.ProjectiveSpotlight" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Disassembly" API="" XML_VERSION="RenderMonkey 1.71"/>
+ <RmStringVariable NAME="Editing Shader" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Fragment Program]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="Editing Pass" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+Render Object]]></RmTextDataBlock></RmStringVariable>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="650" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="429" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmStreamEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="Effect Workspace.Textured.Stream Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="258" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="128" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="851" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="270" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="Effect Workspace.ProjectiveSpotlight.Stream Mapping" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmIntegerVariable NAME="X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="344" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="128" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Width" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="851" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Height" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="270" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="ShowStatus" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Visible" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="0" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ <RmIntegerVariable NAME="Minimized Y" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" VALUE="-1" MIN="-10" MAX="10" CLAMP="FALSE"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmScalarEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="RmDynamicVariableEditor" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmRegistryBranch NAME="NodeRepository" API="" XML_VERSION="RenderMonkey 1.71"/>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmRegistryBranch NAME="WORKSPACE" API="" XML_VERSION="RenderMonkey 1.71">
+ <RmStringVariable NAME="LAST_SAVE" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+19/1/2008 9:30:45]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey Version 1.80 (build 125)]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="XML_VERSION" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+RenderMonkey 1.71]]></RmTextDataBlock></RmStringVariable>
+ <RmStringVariable NAME="BASE_WORKSPACE_PATH" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC=""><RmTextDataBlock TYPE="TEXT"><![CDATA[
+D:\svn\redbook\Code\Chapter_13\ProjectiveSpotlight\]]></RmTextDataBlock></RmStringVariable>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ </RmRegistryBranch>
+ <RmOpenGLESEffect NAME="ProjectiveSpotlight" API="OpenGL ES" ACTIVE_CAMERA="Camera">
+ <RmCamera NAME="Camera" API="" CAMERA_POSITION_X="-95.867363" CAMERA_POSITION_Y="52.315987" CAMERA_POSITION_Z="-127.439903" LOOK_AT_VECTOR_X="0.000000" LOOK_AT_VECTOR_Y="0.000000" LOOK_AT_VECTOR_Z="0.000000" UP_VECTOR_X="0.128836" UP_VECTOR_Y="0.947666" UP_VECTOR_Z="0.292114" FOV="45.000000" NEAR_CLIP_PLANE="1.000000" FAR_CLIP_PLANE="1000.000000"/>
+ <RmMatrixVariable NAME="u_matViewProjection" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="ViewProjection" VALUE_0="-1.824085" VALUE_1="-0.155327" VALUE_2="1.308414" VALUE_3="0.000011" VALUE_4="0.311038" VALUE_5="2.287868" VALUE_6="0.705226" VALUE_7="0.000228" VALUE_8="0.571773" VALUE_9="-0.312024" VALUE_10="0.760079" VALUE_11="167.001587" VALUE_12="0.571202" VALUE_13="-0.311712" VALUE_14="0.759319" VALUE_15="167.834579"/>
+ <RmMatrixVariable NAME="u_matProjection" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="Projection" VALUE_0="2.250190" VALUE_1="0.000000" VALUE_2="0.000000" VALUE_3="0.000000" VALUE_4="0.000000" VALUE_5="2.414213" VALUE_6="0.000000" VALUE_7="0.000000" VALUE_8="0.000000" VALUE_9="0.000000" VALUE_10="-1.001001" VALUE_11="-1.001001" VALUE_12="0.000000" VALUE_13="0.000000" VALUE_14="-1.000000" VALUE_15="0.000000"/>
+ <RmFloatVariable NAME="u_time_0_X" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="Time0_X" VALUE="41.675537" MIN="-1.000000" MAX="1.000000" CLAMP="FALSE"/>
+ <Rm2DTextureVariable NAME="Spotlight" API="" ARTIST_EDITABLE="FALSE" VARIABLE_SEMANTIC="" FILE_NAME="Corona.tga" ORIGIN="0"/>
+ <Rm2DTextureVariable NAME="base" API="" ARTIST_EDITABLE="TRUE" VARIABLE_SEMANTIC="" FILE_NAME="Terrain.tga" ORIGIN="0"/>
+ <RmStreamMap NAME="Stream Mapping" API="">
+ <RmStream NAME="Stream" API="" STRIDE="32">
+ <RmStreamChannel NAME="Position_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="0" USAGE_INDEX="0" ATTRIBUTE_NAME="a_vertex"/>
+ <RmStreamChannel NAME="TexCoord_0" API="" DATA_SIZE="8" DATA_TYPE="1" REGISTER="0" USAGE="5" USAGE_INDEX="0" ATTRIBUTE_NAME="a_texCoord0"/>
+ <RmStreamChannel NAME="Normal_0" API="" DATA_SIZE="12" DATA_TYPE="2" REGISTER="0" USAGE="3" USAGE_INDEX="0" ATTRIBUTE_NAME="a_normal"/>
+ </RmStream>
+ </RmStreamMap>
+ <RmModelData NAME="Terrrain" API="" FILE_NAME=".\Terrain.3ds" ORIENTATION="0"/>
+ <RmGLESPass NAME="Render Object" API="OpenGL ES" PASS_INDEX="0" ENABLED="TRUE">
+ <RmCameraReference NAME="Camera" API="" USE_ACTIVE_CAMERA="FALSE"/>
+ <RmModelReference NAME="Terrrain" API=""/>
+ <RmGLESShader NAME="Fragment Program" API="OpenGL ES" PIXEL_SHADER="TRUE"><RmShaderCode TYPE="TEXT"><![CDATA[
+precision mediump float;
+
+uniform sampler2D baseMap;
+uniform sampler2D spotLight;
+varying vec2 v_texCoord;
+varying vec3 v_projTexCoord;
+varying vec3 v_normal;
+varying vec3 v_lightDir;
+
+
+void main( void )
+{
+ // Projective fetch of spotlight
+ vec4 spotLightColor = texture2DProj( spotLight, v_projTexCoord );
+
+ // Basemap
+ vec4 baseColor = texture2D( baseMap, v_texCoord );
+
+ // Compute N.L
+ float nDotL = max( 0.0, -dot( v_normal, v_lightDir ) );
+
+ gl_FragColor = spotLightColor * baseColor * 2.0 * nDotL;
+
+}]]></RmShaderCode></RmGLESShader>
+ <RmGLESShader NAME="Vertex Program" API="OpenGL ES" PIXEL_SHADER="FALSE"><RmShaderCode TYPE="TEXT"><![CDATA[
+uniform float u_time_0_X;
+uniform mat4 u_matProjection;
+uniform mat4 u_matViewProjection;
+attribute vec4 a_vertex;
+attribute vec2 a_texCoord0;
+attribute vec3 a_normal;
+
+varying vec2 v_texCoord;
+varying vec3 v_projTexCoord;
+varying vec3 v_normal;
+varying vec3 v_lightDir;
+
+void main( void )
+{
+ gl_Position = u_matViewProjection * a_vertex;
+ v_texCoord = a_texCoord0.xy;
+
+ // Compute a light position based on time
+ vec3 lightPos;
+ lightPos.x = cos(u_time_0_X);
+ lightPos.z = sin(u_time_0_X);
+ lightPos.xz = 100.0 * normalize(lightPos.xz);
+ lightPos.y = 100.0;
+
+ // Compute the light coordinate axes
+ vec3 look = -normalize( lightPos );
+ vec3 right = cross( vec3( 0.0, 0.0, 1.0), look );
+ vec3 up = cross( look, right );
+
+ // Create a view matrix for the light
+ mat4 lightView = mat4( right, dot( right, -lightPos ),
+ up, dot( up, -lightPos ),
+ look, dot( look, -lightPos),
+ 0.0, 0.0, 0.0, 1.0 );
+
+ // Transform position into light view space
+ vec4 objPosLight = a_vertex * lightView;
+
+ // Transform position into projective light view space
+ objPosLight = u_matProjection * objPosLight;
+
+ // Create bias matrix
+ mat3 biasMatrix = mat3( 0.5, 0.0, 0.5,
+ 0.0, -0.5, 0.5,
+ 0.0, 0.0, 1.0 );
+
+ // Compute projective texture coordinates
+ v_projTexCoord = objPosLight.xyz * biasMatrix;
+
+ v_lightDir = normalize(a_vertex.xyz - lightPos);
+ v_normal = a_normal;
+
+}]]></RmShaderCode></RmGLESShader>
+ <RmStreamMapReference NAME="Stream Mapping" API=""/>
+ <RmTextureObject NAME="baseMap" API="OpenGL ES" STATE_INDEX="0" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="base" API=""/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="6" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmTextureObject NAME="spotLight" API="OpenGL ES" STATE_INDEX="1" VERTEX_TEXTURE="FALSE">
+ <RmTextureReference NAME="Spotlight" API=""/>
+ <RmState NAME="GL_TextureWrapS" API="OpenGL ES" STATE="1" VALUE="2" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureWrapT" API="OpenGL ES" STATE="2" VALUE="2" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureWrapR" API="OpenGL ES" STATE="3" VALUE="2" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMinify" API="OpenGL ES" STATE="4" VALUE="1" USAGE="SAMPLER_STATE"/>
+ <RmState NAME="GL_TextureMagnify" API="OpenGL ES" STATE="5" VALUE="1" USAGE="SAMPLER_STATE"/>
+ </RmTextureObject>
+ <RmSampler NAME="baseMap" API="" REGISTER="-1"/>
+ <RmSampler NAME="spotLight" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_time_0_X" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matProjection" API="" REGISTER="-1"/>
+ <RmShaderConstant NAME="u_matViewProjection" API="" REGISTER="-1"/>
+ </RmGLESPass>
+ </RmOpenGLESEffect>
+ </RmEffectWorkspace>
+</RENDER_MONKEY>
diff --git a/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Terrain.3ds b/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Terrain.3ds
new file mode 100644
index 0000000..a46d787
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Terrain.3ds
Binary files differ
diff --git a/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Terrain.tga b/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Terrain.tga
new file mode 100644
index 0000000..47d5117
--- /dev/null
+++ b/third_party/gles2_book/Chapter_13/ProjectiveSpotlight/Terrain.tga
Binary files differ
diff --git a/third_party/gles2_book/Chapter_15/Hello_Triangle_KD/Hello_Triangle_KD.c b/third_party/gles2_book/Chapter_15/Hello_Triangle_KD/Hello_Triangle_KD.c
new file mode 100644
index 0000000..8477159
--- /dev/null
+++ b/third_party/gles2_book/Chapter_15/Hello_Triangle_KD/Hello_Triangle_KD.c
@@ -0,0 +1,306 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// Hello_Triangle_KD.c
+//
+// This is a simple example that draws a single triangle with
+// a minimal vertex/fragment shader using OpenKODE.
+//
+#include <KD/kd.h>
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+
+ // EGL handles
+ EGLDisplay eglDisplay;
+ EGLContext eglContext;
+ EGLSurface eglSurface;
+
+} UserData;
+
+///
+// Create a shader object, load the shader source, and
+// compile the shader.
+//
+GLuint LoadShader ( GLenum type, const char *shaderSrc )
+{
+ GLuint shader;
+ GLint compiled;
+
+ // Create the shader object
+ shader = glCreateShader ( type );
+
+ if ( shader == 0 )
+ return 0;
+
+ // Load the shader source
+ glShaderSource ( shader, 1, &shaderSrc, NULL );
+
+ // Compile the shader
+ glCompileShader ( shader );
+
+ // Check the compile status
+ glGetShaderiv ( shader, GL_COMPILE_STATUS, &compiled );
+
+ if ( !compiled )
+ {
+ GLint infoLen = 0;
+
+ glGetShaderiv ( shader, GL_INFO_LOG_LENGTH, &infoLen );
+
+ if ( infoLen > 1 )
+ {
+ char* infoLog = kdMalloc (sizeof(char) * infoLen );
+
+ glGetShaderInfoLog ( shader, infoLen, NULL, infoLog );
+ kdLogMessage ( infoLog );
+
+ kdFree ( infoLog );
+ }
+
+ glDeleteShader ( shader );
+ return 0;
+ }
+
+ return shader;
+
+}
+
+///
+// Initialize the shader and program object
+//
+int Init ( UserData *userData )
+{
+ GLbyte vShaderStr[] =
+ "attribute vec4 vPosition; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = vPosition; \n"
+ "} \n";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float;\n"\
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = vec4 ( 1.0, 0.0, 0.0, 1.0 );\n"
+ "} \n";
+
+ GLuint vertexShader;
+ GLuint fragmentShader;
+ GLuint programObject;
+ GLint linked;
+
+ // Load the vertex/fragment shaders
+ vertexShader = LoadShader ( GL_VERTEX_SHADER, vShaderStr );
+ fragmentShader = LoadShader ( GL_FRAGMENT_SHADER, fShaderStr );
+
+ // Create the program object
+ programObject = glCreateProgram ( );
+
+ if ( programObject == 0 )
+ return 0;
+
+ glAttachShader ( programObject, vertexShader );
+ glAttachShader ( programObject, fragmentShader );
+
+ // Bind vPosition to attribute 0
+ glBindAttribLocation ( programObject, 0, "vPosition" );
+
+ // Link the program
+ glLinkProgram ( programObject );
+
+ // Check the link status
+ glGetProgramiv ( programObject, GL_LINK_STATUS, &linked );
+
+ if ( !linked )
+ {
+ GLint infoLen = 0;
+
+ glGetProgramiv ( programObject, GL_INFO_LOG_LENGTH, &infoLen );
+
+ if ( infoLen > 1 )
+ {
+ char* infoLog = kdMalloc (sizeof(char) * infoLen );
+
+ glGetProgramInfoLog ( programObject, infoLen, NULL, infoLog );
+ kdLogMessage ( infoLog );
+
+ kdFree ( infoLog );
+ }
+
+ glDeleteProgram ( programObject );
+ return FALSE;
+ }
+
+ // Store the program object
+ userData->programObject = programObject;
+
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+ return TRUE;
+}
+
+///
+// Draw a triangle using the shader pair created in Init()
+//
+void Draw ( UserData *userData )
+{
+ GLfloat vVertices[] = { 0.0f, 0.5f, 0.0f,
+ -0.5f, -0.5f, 0.0f,
+ 0.5f, -0.5f, 0.0f };
+
+ // Set the viewport
+ glViewport ( 0, 0, 320, 240 );
+
+ // Clear the color buffer
+ glClear ( GL_COLOR_BUFFER_BIT );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex data
+ glVertexAttribPointer ( 0, 3, GL_FLOAT, GL_FALSE, 0, vVertices );
+ glEnableVertexAttribArray ( 0 );
+
+ glDrawArrays ( GL_TRIANGLES, 0, 3 );
+
+ eglSwapBuffers ( userData->eglDisplay, userData->eglSurface );
+}
+
+
+///
+// InitEGLContext()
+//
+// Initialize an EGL rendering context and all associated elements
+//
+EGLBoolean InitEGLContext ( UserData *userData,
+ KDWindow *window,
+ EGLConfig config )
+{
+ EGLContext context;
+ EGLSurface surface;
+ EGLint contextAttribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE, EGL_NONE };
+
+ // Get native window handle
+ EGLNativeWindowType hWnd;
+ if(kdRealizeWindow(window, &hWnd) != 0)
+ {
+ return EGL_FALSE;
+ }
+ surface = eglCreateWindowSurface(userData->eglDisplay, config, hWnd, NULL);
+ if ( surface == EGL_NO_SURFACE )
+ {
+ return EGL_FALSE;
+ }
+
+ // Create a GL context
+ context = eglCreateContext(userData->eglDisplay, config, EGL_NO_CONTEXT, contextAttribs );
+ if ( context == EGL_NO_CONTEXT )
+ {
+ return EGL_FALSE;
+ }
+
+ // Make the context current
+ if ( !eglMakeCurrent(userData->eglDisplay, surface, surface, context) )
+ {
+ return EGL_FALSE;
+ }
+
+ userData->eglContext = context;
+ userData->eglSurface = surface;
+
+ return EGL_TRUE;
+}
+
+///
+// kdMain()
+//
+// Main function for OpenKODE application
+//
+KDint kdMain ( KDint argc, const KDchar *const *argv )
+{
+ EGLint attribList[] =
+ {
+ EGL_RED_SIZE, 8,
+ EGL_GREEN_SIZE, 8,
+ EGL_BLUE_SIZE, 8,
+ EGL_ALPHA_SIZE, EGL_DONT_CARE,
+ EGL_DEPTH_SIZE, EGL_DONT_CARE,
+ EGL_STENCIL_SIZE, EGL_DONT_CARE,
+ EGL_NONE
+ };
+ EGLint majorVersion,
+ minorVersion;
+ UserData userData;
+ EGLint numConfigs;
+ EGLConfig config;
+ KDWindow *window = KD_NULL;
+
+ userData.eglDisplay = eglGetDisplay( EGL_DEFAULT_DISPLAY );
+
+ // Initialize EGL
+ if ( !eglInitialize(userData.eglDisplay, &majorVersion, &minorVersion) )
+ {
+ return EGL_FALSE;
+ }
+
+ // Get configs
+ if ( !eglGetConfigs(userData.eglDisplay, NULL, 0, &numConfigs) )
+ {
+ return EGL_FALSE;
+ }
+
+ // Choose config
+ if ( !eglChooseConfig(userData.eglDisplay, attribList, &config, 1, &numConfigs) )
+ {
+ return EGL_FALSE;
+ }
+
+
+ // Use OpenKODE to create a Window
+ window = kdCreateWindow ( userData.eglDisplay, config, KD_NULL );
+ if( !window )
+ kdExit ( 0 );
+
+ if ( !InitEGLContext ( &userData, window, config ) )
+ kdExit ( 0 );
+
+ if ( !Init ( &userData ) )
+ kdExit ( 0 );
+
+ // Main Loop
+ while ( 1 )
+ {
+ // Wait for an event
+ const KDEvent *evt = kdWaitEvent ( 0 );
+ if ( evt )
+ {
+ // Exit app
+ if ( evt->type == KD_EVENT_WINDOW_CLOSE)
+ break;
+ }
+
+ // Draw frame
+ Draw ( &userData );
+ }
+
+ // EGL clean up
+ eglMakeCurrent ( 0, 0, 0, 0 );
+ eglDestroySurface ( userData.eglDisplay, userData.eglSurface );
+ eglDestroyContext ( userData.eglDisplay, userData.eglContext );
+
+ // Destroy the window
+ kdDestroyWindow(window);
+
+ return 0;
+}
diff --git a/third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.c b/third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.c
new file mode 100644
index 0000000..c57af1c
--- /dev/null
+++ b/third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.c
@@ -0,0 +1,104 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// Hello_Triangle.c
+//
+// This is a simple example that draws a single triangle with
+// a minimal vertex/fragment shader. The purpose of this
+// example is to demonstrate the basic concepts of
+// OpenGL ES 2.0 rendering.
+
+#include "Hello_Triangle.h"
+
+#include <stdlib.h>
+
+///
+// Initialize the shader and program object
+//
+int htInit ( ESContext *esContext )
+{
+ HTUserData *userData = esContext->userData;
+
+ GLbyte vShaderStr[] =
+ "attribute vec4 vPosition; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = vPosition; \n"
+ "} \n";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = vec4 ( 1.0, 0.0, 0.0, 1.0 );\n"
+ "} \n";
+
+ GLfloat vVertices[] = { 0.0f, 0.5f, 0.0f,
+ -0.5f, -0.5f, 0.0f,
+ 0.5f, -0.5f, 0.0f };
+
+ userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
+ if ( userData->programObject == 0 ) return FALSE;
+
+ // Bind vPosition to attribute 0
+ glBindAttribLocation ( userData->programObject, 0, "vPosition" );
+
+ glGenBuffers ( 1, &userData->vbo );
+ glBindBuffer ( GL_ARRAY_BUFFER, userData->vbo );
+ glBufferData ( GL_ARRAY_BUFFER, sizeof(vVertices), NULL, GL_STATIC_DRAW );
+ glBufferSubData ( GL_ARRAY_BUFFER, 0, sizeof(vVertices), vVertices );
+
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+ return TRUE;
+}
+
+///
+// Draw a triangle using the shader pair created in Init()
+//
+void htDraw ( ESContext *esContext )
+{
+ HTUserData *userData = esContext->userData;
+
+ // Set the viewport
+ glViewport ( 0, 0, esContext->width, esContext->height );
+
+ // Clear the color buffer
+ glClear ( GL_COLOR_BUFFER_BIT );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex data
+ glBindBuffer ( GL_ARRAY_BUFFER, userData->vbo );
+ glEnableVertexAttribArray ( 0 );
+ glVertexAttribPointer ( 0, 3, GL_FLOAT, GL_FALSE, 0, 0 );
+
+ glDrawArrays ( GL_TRIANGLES, 0, 3 );
+}
+
+///
+// Cleanup
+//
+void htShutDown ( ESContext *esContext )
+{
+ HTUserData *userData = esContext->userData;
+
+ // Delete program object
+ if ( userData->programObject != 0 )
+ {
+ glDeleteProgram ( userData->programObject );
+ userData->programObject = 0;
+ }
+ if ( userData->vbo != 0 )
+ {
+ glDeleteBuffers ( 1, &userData->vbo );
+ userData->vbo = 0;
+ }
+}
diff --git a/third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.h b/third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.h
new file mode 100644
index 0000000..4e90d2f
--- /dev/null
+++ b/third_party/gles2_book/Chapter_2/Hello_Triangle/Hello_Triangle.h
@@ -0,0 +1,38 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+#ifndef HELLO_TRIANGLE_H
+#define HELLO_TRIANGLE_H
+
+#include "esUtil.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+ // Handle to vbo object
+ GLuint vbo;
+
+} HTUserData;
+
+extern int htInit ( ESContext *esContext );
+
+extern void htDraw ( ESContext *esContext );
+
+extern void htShutDown ( ESContext *esContext );
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+#endif // HELLO_TRIANGLE_H
diff --git a/third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.c b/third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.c
new file mode 100644
index 0000000..7a6b577
--- /dev/null
+++ b/third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.c
@@ -0,0 +1,150 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// Simple_VertexShader.c
+//
+// This is a simple example that draws a rotating cube in perspective
+// using a vertex shader to transform the object
+//
+
+#include "Simple_VertexShader.h"
+#include <stdlib.h>
+
+///
+// Initialize the shader and program object
+//
+int svsInit ( ESContext *esContext )
+{
+ SVSUserData *userData = esContext->userData;
+ int numVertices = 24;
+ GLfloat *vertices = NULL;
+ GLushort *indices = NULL;
+
+ GLbyte vShaderStr[] =
+ "uniform mat4 u_mvpMatrix; \n"
+ "attribute vec4 a_position; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = u_mvpMatrix * a_position; \n"
+ "} \n";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); \n"
+ "} \n";
+
+ // Load the shaders and get a linked program object
+ userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
+ if ( userData->programObject == 0 ) return FALSE;
+
+ // Get the attribute locations
+ userData->positionLoc = glGetAttribLocation ( userData->programObject, "a_position" );
+
+ // Get the uniform locations
+ userData->mvpLoc = glGetUniformLocation( userData->programObject, "u_mvpMatrix" );
+
+ // Generate the vertex data
+ userData->numIndices = esGenCube( 1.0, &vertices, NULL, NULL, &indices );
+ glGenBuffers ( 2, userData->vboIds );
+ glBindBuffer ( GL_ARRAY_BUFFER, userData->vboIds[0] );
+ glBufferData ( GL_ARRAY_BUFFER, 3 * numVertices * sizeof(GLfloat),
+ vertices, GL_STATIC_DRAW );
+ glBindBuffer ( GL_ELEMENT_ARRAY_BUFFER, userData->vboIds[1] );
+ glBufferData ( GL_ELEMENT_ARRAY_BUFFER, userData->numIndices * sizeof(GLushort),
+ indices, GL_STATIC_DRAW );
+ if ( vertices != NULL ) free ( vertices );
+ if ( indices != NULL ) free ( indices );
+
+ // Starting rotation angle for the cube
+ userData->angle = 45.0f;
+
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+ return TRUE;
+}
+
+///
+// Update MVP matrix based on time
+//
+void svsUpdate ( ESContext *esContext, float deltaTime )
+{
+ SVSUserData *userData = (SVSUserData*) esContext->userData;
+ ESMatrix perspective;
+ ESMatrix modelview;
+ float aspect;
+
+ // Compute a rotation angle based on time to rotate the cube
+ userData->angle += ( deltaTime * 40.0f );
+ if( userData->angle >= 360.0f )
+ userData->angle -= 360.0f;
+
+ // Compute the window aspect ratio
+ aspect = (GLfloat) esContext->width / (GLfloat) esContext->height;
+
+ // Generate a perspective matrix with a 60 degree FOV
+ esMatrixLoadIdentity( &perspective );
+ esPerspective( &perspective, 60.0f, aspect, 1.0f, 20.0f );
+
+ // Generate a model view matrix to rotate/translate the cube
+ esMatrixLoadIdentity( &modelview );
+
+ // Translate away from the viewer
+ esTranslate( &modelview, 0.0, 0.0, -2.0 );
+
+ // Rotate the cube
+ esRotate( &modelview, userData->angle, 1.0, 0.0, 1.0 );
+
+ // Compute the final MVP by multiplying the
+ // modevleiw and perspective matrices together
+ esMatrixMultiply( &userData->mvpMatrix, &modelview, &perspective );
+}
+
+///
+// Draw a triangle using the shader pair created in Init()
+//
+void svsDraw ( ESContext *esContext )
+{
+ SVSUserData *userData = esContext->userData;
+
+ // Set the viewport
+ glViewport ( 0, 0, esContext->width, esContext->height );
+
+ // Clear the color buffer
+ glClear ( GL_COLOR_BUFFER_BIT );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex position
+ glEnableVertexAttribArray ( userData->positionLoc );
+ glVertexAttribPointer ( userData->positionLoc, 3, GL_FLOAT,
+ GL_FALSE, 3 * sizeof(GLfloat), 0 );
+
+ // Load the MVP matrix
+ glUniformMatrix4fv( userData->mvpLoc, 1, GL_FALSE, (GLfloat*) &userData->mvpMatrix.m[0][0] );
+
+ // Draw the cube
+ glDrawElements ( GL_TRIANGLES, userData->numIndices, GL_UNSIGNED_SHORT, 0 );
+}
+
+///
+// Cleanup
+//
+void svsShutDown ( ESContext *esContext )
+{
+ SVSUserData *userData = esContext->userData;
+
+ // Delete program object
+ glDeleteBuffers ( 2, userData->vboIds );
+
+ // Delete program object
+ glDeleteProgram ( userData->programObject );
+}
diff --git a/third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.h b/third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.h
new file mode 100644
index 0000000..b581185
--- /dev/null
+++ b/third_party/gles2_book/Chapter_8/Simple_VertexShader/Simple_VertexShader.h
@@ -0,0 +1,53 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+#ifndef SIMPLE_VERTEX_SHADER_H
+#define SIMPLE_VERTEX_SHADER_H
+
+#include "esUtil.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+
+ // Attribute locations
+ GLint positionLoc;
+
+ // Uniform locations
+ GLint mvpLoc;
+
+ // Vertex data
+ int numIndices;
+ GLuint vboIds[2];
+
+ // Rotation angle
+ GLfloat angle;
+
+ // MVP matrix
+ ESMatrix mvpMatrix;
+} SVSUserData;
+
+extern int svsInit ( ESContext *esContext );
+
+extern void svsUpdate ( ESContext *esContext, float deltaTime );
+
+extern void svsDraw ( ESContext *esContext );
+
+extern void svsShutDown ( ESContext *esContext );
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+#endif // SIMPLE_VERTEX_SHADER_H
diff --git a/third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.c b/third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.c
new file mode 100644
index 0000000..eb288fc
--- /dev/null
+++ b/third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.c
@@ -0,0 +1,321 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// MipMap2D.c
+//
+// This is a simple example that demonstrates generating a mipmap chain
+// and rendering with it
+//
+#include <stdlib.h>
+#include "MipMap2D.h"
+
+///
+// From an RGB8 source image, generate the next level mipmap
+//
+static GLboolean GenMipMap2D( GLubyte *src, GLubyte **dst, int srcWidth, int srcHeight, int *dstWidth, int *dstHeight )
+{
+ int x,
+ y;
+ int texelSize = 3;
+
+ *dstWidth = srcWidth / 2;
+ if ( *dstWidth <= 0 )
+ *dstWidth = 1;
+
+ *dstHeight = srcHeight / 2;
+ if ( *dstHeight <= 0 )
+ *dstHeight = 1;
+
+ *dst = malloc ( sizeof(GLubyte) * texelSize * (*dstWidth) * (*dstHeight) );
+ if ( *dst == NULL )
+ return GL_FALSE;
+
+ for ( y = 0; y < *dstHeight; y++ )
+ {
+ for( x = 0; x < *dstWidth; x++ )
+ {
+ int srcIndex[4];
+ float r = 0.0f,
+ g = 0.0f,
+ b = 0.0f;
+ int sample;
+
+ // Compute the offsets for 2x2 grid of pixels in previous
+ // image to perform box filter
+ srcIndex[0] =
+ (((y * 2) * srcWidth) + (x * 2)) * texelSize;
+ srcIndex[1] =
+ (((y * 2) * srcWidth) + (x * 2 + 1)) * texelSize;
+ srcIndex[2] =
+ ((((y * 2) + 1) * srcWidth) + (x * 2)) * texelSize;
+ srcIndex[3] =
+ ((((y * 2) + 1) * srcWidth) + (x * 2 + 1)) * texelSize;
+
+ // Sum all pixels
+ for ( sample = 0; sample < 4; sample++ )
+ {
+ r += src[srcIndex[sample]];
+ g += src[srcIndex[sample] + 1];
+ b += src[srcIndex[sample] + 2];
+ }
+
+ // Average results
+ r /= 4.0;
+ g /= 4.0;
+ b /= 4.0;
+
+ // Store resulting pixels
+ (*dst)[ ( y * (*dstWidth) + x ) * texelSize ] = (GLubyte)( r );
+ (*dst)[ ( y * (*dstWidth) + x ) * texelSize + 1] = (GLubyte)( g );
+ (*dst)[ ( y * (*dstWidth) + x ) * texelSize + 2] = (GLubyte)( b );
+ }
+ }
+
+ return GL_TRUE;
+}
+
+///
+// Generate an RGB8 checkerboard image
+//
+static GLubyte* GenCheckImage( int width, int height, int checkSize )
+{
+ int x,
+ y;
+ GLubyte *pixels = malloc( width * height * 3 );
+
+ if ( pixels == NULL )
+ return NULL;
+
+ for ( y = 0; y < height; y++ )
+ for ( x = 0; x < width; x++ )
+ {
+ GLubyte rColor = 0;
+ GLubyte bColor = 0;
+
+ if ( ( x / checkSize ) % 2 == 0 )
+ {
+ rColor = 255 * ( ( y / checkSize ) % 2 );
+ bColor = 255 * ( 1 - ( ( y / checkSize ) % 2 ) );
+ }
+ else
+ {
+ bColor = 255 * ( ( y / checkSize ) % 2 );
+ rColor = 255 * ( 1 - ( ( y / checkSize ) % 2 ) );
+ }
+
+ pixels[(y * height + x) * 3] = rColor;
+ pixels[(y * height + x) * 3 + 1] = 0;
+ pixels[(y * height + x) * 3 + 2] = bColor;
+ }
+
+ return pixels;
+}
+
+///
+// Create a mipmapped 2D texture image
+//
+static GLuint CreateMipMappedTexture2D( )
+{
+ // Texture object handle
+ GLuint textureId;
+ int width = 256,
+ height = 256;
+ int level;
+ GLubyte *pixels;
+ GLubyte *prevImage;
+ GLubyte *newImage;
+
+ pixels = GenCheckImage( width, height, 8 );
+ if ( pixels == NULL )
+ return 0;
+
+ // Generate a texture object
+ glGenTextures ( 1, &textureId );
+
+ // Bind the texture object
+ glBindTexture ( GL_TEXTURE_2D, textureId );
+
+ // Load mipmap level 0
+ glTexImage2D ( GL_TEXTURE_2D, 0, GL_RGB, width, height,
+ 0, GL_RGB, GL_UNSIGNED_BYTE, pixels );
+
+ level = 1;
+ prevImage = &pixels[0];
+
+ while ( width > 1 && height > 1 )
+ {
+ int newWidth,
+ newHeight;
+
+ // Generate the next mipmap level
+ GenMipMap2D( prevImage, &newImage, width, height,
+ &newWidth, &newHeight );
+
+ // Load the mipmap level
+ glTexImage2D( GL_TEXTURE_2D, level, GL_RGB,
+ newWidth, newHeight, 0, GL_RGB,
+ GL_UNSIGNED_BYTE, newImage );
+
+ // Free the previous image
+ free ( prevImage );
+
+ // Set the previous image for the next iteration
+ prevImage = newImage;
+ level++;
+
+ // Half the width and height
+ width = newWidth;
+ height = newHeight;
+ }
+
+ free ( newImage );
+
+ // Set the filtering mode
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+
+ return textureId;
+
+}
+
+
+///
+// Initialize the shader and program object
+//
+int mmInit ( ESContext *esContext )
+{
+ MMUserData *userData = esContext->userData;
+ GLbyte vShaderStr[] =
+ "uniform float u_offset; \n"
+ "attribute vec4 a_position; \n"
+ "attribute vec2 a_texCoord; \n"
+ "varying vec2 v_texCoord; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = a_position; \n"
+ " gl_Position.x += u_offset;\n"
+ " v_texCoord = a_texCoord; \n"
+ "} \n";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float; \n"
+ "varying vec2 v_texCoord; \n"
+ "uniform sampler2D s_texture; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = texture2D( s_texture, v_texCoord );\n"
+ "} \n";
+
+ GLfloat vVertices[] = { -0.5f, 0.5f, 0.0f, 1.5f, // Position 0
+ 0.0f, 0.0f, // TexCoord 0
+ -0.5f, -0.5f, 0.0f, 0.75f, // Position 1
+ 0.0f, 1.0f, // TexCoord 1
+ 0.5f, -0.5f, 0.0f, 0.75f, // Position 2
+ 1.0f, 1.0f, // TexCoord 2
+ 0.5f, 0.5f, 0.0f, 1.5f, // Position 3
+ 1.0f, 0.0f // TexCoord 3
+ };
+ GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+
+ // Load the shaders and get a linked program object
+ userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
+ if (userData->programObject == 0) return FALSE;
+
+ // Get the attribute locations
+ userData->positionLoc = glGetAttribLocation ( userData->programObject, "a_position" );
+ userData->texCoordLoc = glGetAttribLocation ( userData->programObject, "a_texCoord" );
+
+ // Get the sampler location
+ userData->samplerLoc = glGetUniformLocation ( userData->programObject, "s_texture" );
+
+ // Get the offset location
+ userData->offsetLoc = glGetUniformLocation( userData->programObject, "u_offset" );
+
+ // Load the texture
+ userData->textureId = CreateMipMappedTexture2D ();
+
+ // Load vertex data
+ glGenBuffers ( 2, userData->vboIds );
+ glBindBuffer ( GL_ARRAY_BUFFER, userData->vboIds[0] );
+ glBufferData ( GL_ARRAY_BUFFER, sizeof(vVertices),
+ vVertices, GL_STATIC_DRAW);
+ glBindBuffer ( GL_ELEMENT_ARRAY_BUFFER, userData->vboIds[1] );
+ glBufferData ( GL_ELEMENT_ARRAY_BUFFER, sizeof(indices),
+ indices, GL_STATIC_DRAW );
+
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+ return TRUE;
+}
+
+///
+// Draw a triangle using the shader pair created in Init()
+//
+#define VTX_POS_SIZE 4
+#define VTX_TEX_SIZE 2
+#define VTX_STRIDE (6 * sizeof(GLfloat))
+void mmDraw ( ESContext *esContext )
+{
+ MMUserData *userData = esContext->userData;
+ GLuint offset = 0;
+
+ // Set the viewport
+ glViewport ( 0, 0, esContext->width, esContext->height );
+
+ // Clear the color buffer
+ glClear ( GL_COLOR_BUFFER_BIT );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex position
+ glVertexAttribPointer ( userData->positionLoc, VTX_POS_SIZE, GL_FLOAT,
+ GL_FALSE, VTX_STRIDE, (GLvoid*) offset );
+ offset += VTX_POS_SIZE * sizeof(GLfloat);
+ // Load the texture coordinate
+ glVertexAttribPointer ( userData->texCoordLoc, VTX_TEX_SIZE, GL_FLOAT,
+ GL_FALSE, VTX_STRIDE, (GLvoid*) offset );
+
+ glEnableVertexAttribArray ( userData->positionLoc );
+ glEnableVertexAttribArray ( userData->texCoordLoc );
+
+ // Bind the texture
+ glActiveTexture ( GL_TEXTURE0 );
+ glBindTexture ( GL_TEXTURE_2D, userData->textureId );
+
+ // Set the sampler texture unit to 0
+ glUniform1i ( userData->samplerLoc, 0 );
+
+ // Draw quad with nearest sampling
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+ glUniform1f ( userData->offsetLoc, -0.6f );
+ glDrawElements ( GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0 );
+
+ // Draw quad with trilinear filtering
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
+ glUniform1f ( userData->offsetLoc, 0.6f );
+ glDrawElements ( GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0 );
+}
+
+///
+// Cleanup
+//
+void mmShutDown ( ESContext *esContext )
+{
+ MMUserData *userData = esContext->userData;
+
+ // Delete texture object
+ glDeleteTextures ( 1, &userData->textureId );
+
+ // Delete VBOs
+ glDeleteBuffers ( 2, userData->vboIds );
+
+ // Delete program object
+ glDeleteProgram ( userData->programObject );
+}
diff --git a/third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.h b/third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.h
new file mode 100644
index 0000000..9dbe834
--- /dev/null
+++ b/third_party/gles2_book/Chapter_9/MipMap2D/MipMap2D.h
@@ -0,0 +1,52 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+#ifndef MIP_MAP_2D_H
+#define MIP_MAP_2D_H
+
+#include "esUtil.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+
+ // Attribute locations
+ GLint positionLoc;
+ GLint texCoordLoc;
+
+ // Sampler location
+ GLint samplerLoc;
+
+ // Offset location
+ GLint offsetLoc;
+
+ // Texture handle
+ GLuint textureId;
+
+ // Vertex buffer object handle
+ GLuint vboIds[2];
+
+} MMUserData;
+
+extern int mmInit ( ESContext *esContext );
+
+extern void mmDraw ( ESContext *esContext );
+
+extern void mmShutDown ( ESContext *esContext );
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+#endif // MIP_MAP_2D_H
diff --git a/third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.c b/third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.c
new file mode 100644
index 0000000..12200fd
--- /dev/null
+++ b/third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.c
@@ -0,0 +1,176 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// Simple_Texture2D.c
+//
+// This is a simple example that draws a quad with a 2D
+// texture image. The purpose of this example is to demonstrate
+// the basics of 2D texturing
+//
+#include <stdlib.h>
+#include "Simple_Texture2D.h"
+
+///
+// Create a simple 2x2 texture image with four different colors
+//
+static GLuint CreateSimpleTexture2D( )
+{
+ // Texture object handle
+ GLuint textureId;
+
+ // 2x2 Image, 3 bytes per pixel (R, G, B)
+ GLubyte pixels[4 * 3] =
+ {
+ 255, 0, 0, // Red
+ 0, 255, 0, // Green
+ 0, 0, 255, // Blue
+ 255, 255, 0 // Yellow
+ };
+
+ // Use tightly packed data
+ glPixelStorei ( GL_UNPACK_ALIGNMENT, 1 );
+
+ // Generate a texture object
+ glGenTextures ( 1, &textureId );
+
+ // Bind the texture object
+ glBindTexture ( GL_TEXTURE_2D, textureId );
+
+ // Load the texture
+ glTexImage2D ( GL_TEXTURE_2D, 0, GL_RGB, 2, 2, 0, GL_RGB, GL_UNSIGNED_BYTE, pixels );
+
+ // Set the filtering mode
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
+
+ return textureId;
+
+}
+
+
+///
+// Initialize the shader and program object
+//
+int stInit ( ESContext *esContext )
+{
+ STUserData *userData = esContext->userData;
+ GLbyte vShaderStr[] =
+ "attribute vec4 a_position; \n"
+ "attribute vec2 a_texCoord; \n"
+ "varying vec2 v_texCoord; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = a_position; \n"
+ " v_texCoord = a_texCoord; \n"
+ "} \n";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float; \n"
+ "varying vec2 v_texCoord; \n"
+ "uniform sampler2D s_texture; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = texture2D( s_texture, v_texCoord );\n"
+ "} \n";
+
+ GLfloat vVertices[] = { -0.5f, 0.5f, 0.0f, // Position 0
+ 0.0f, 0.0f, // TexCoord 0
+ -0.5f, -0.5f, 0.0f, // Position 1
+ 0.0f, 1.0f, // TexCoord 1
+ 0.5f, -0.5f, 0.0f, // Position 2
+ 1.0f, 1.0f, // TexCoord 2
+ 0.5f, 0.5f, 0.0f, // Position 3
+ 1.0f, 0.0f // TexCoord 3
+ };
+ GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+
+ // Load the shaders and get a linked program object
+ userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
+
+ // Get the attribute locations
+ userData->positionLoc = glGetAttribLocation ( userData->programObject, "a_position" );
+ userData->texCoordLoc = glGetAttribLocation ( userData->programObject, "a_texCoord" );
+
+ // Get the sampler location
+ userData->samplerLoc = glGetUniformLocation ( userData->programObject, "s_texture" );
+
+ // Load the texture
+ userData->textureId = CreateSimpleTexture2D ();
+
+ // Load vertex data
+ glGenBuffers ( 2, userData->vboIds );
+ glBindBuffer ( GL_ARRAY_BUFFER, userData->vboIds[0] );
+ glBufferData ( GL_ARRAY_BUFFER, sizeof(vVertices),
+ vVertices, GL_STATIC_DRAW);
+ glBindBuffer ( GL_ELEMENT_ARRAY_BUFFER, userData->vboIds[1] );
+ glBufferData ( GL_ELEMENT_ARRAY_BUFFER, sizeof(indices),
+ indices, GL_STATIC_DRAW );
+
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+ return TRUE;
+}
+
+///
+// Draw a triangle using the shader pair created in Init()
+//
+#define VTX_POS_SIZE 3
+#define VTX_TEX_SIZE 2
+#define VTX_STRIDE (5 * sizeof(GLfloat))
+void stDraw ( ESContext *esContext )
+{
+ STUserData *userData = esContext->userData;
+ GLuint offset = 0;
+
+ // Set the viewport
+ glViewport ( 0, 0, esContext->width, esContext->height );
+
+ // Clear the color buffer
+ glClear ( GL_COLOR_BUFFER_BIT );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex position
+ glVertexAttribPointer ( userData->positionLoc, VTX_POS_SIZE, GL_FLOAT,
+ GL_FALSE, VTX_STRIDE, (GLvoid*) offset );
+ // Load the texture coordinate
+ offset += VTX_POS_SIZE * sizeof(GLfloat);
+ glVertexAttribPointer ( userData->texCoordLoc, VTX_TEX_SIZE, GL_FLOAT,
+ GL_FALSE, VTX_STRIDE, (GLvoid*) offset );
+
+ glEnableVertexAttribArray ( userData->positionLoc );
+ glEnableVertexAttribArray ( userData->texCoordLoc );
+
+ // Bind the texture
+ glActiveTexture ( GL_TEXTURE0 );
+ glBindTexture ( GL_TEXTURE_2D, userData->textureId );
+
+ // Set the sampler texture unit to 0
+ glUniform1i ( userData->samplerLoc, 0 );
+
+ glDrawElements ( GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0 );
+}
+
+///
+// Cleanup
+//
+void stShutDown ( ESContext *esContext )
+{
+ STUserData *userData = esContext->userData;
+
+ // Delete texture object
+ glDeleteTextures ( 1, &userData->textureId );
+
+ // Delete VBOs
+ glDeleteBuffers ( 2, userData->vboIds );
+
+ // Delete program object
+ glDeleteProgram ( userData->programObject );
+}
diff --git a/third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.h b/third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.h
new file mode 100644
index 0000000..835b63f
--- /dev/null
+++ b/third_party/gles2_book/Chapter_9/Simple_Texture2D/Simple_Texture2D.h
@@ -0,0 +1,49 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+#ifndef SIMPLE_TEXTURE_2D_H
+#define SIMPLE_TEXTURE_2D_H
+
+#include "esUtil.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+
+ // Attribute locations
+ GLint positionLoc;
+ GLint texCoordLoc;
+
+ // Sampler location
+ GLint samplerLoc;
+
+ // Texture handle
+ GLuint textureId;
+
+ // Vertex buffer object handles
+ GLuint vboIds[2];
+
+} STUserData;
+
+extern int stInit ( ESContext *esContext );
+
+extern void stDraw ( ESContext *esContext );
+
+extern void stShutDown ( ESContext *esContext );
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+#endif // SIMPLE_TEXTURE_2D_H
diff --git a/third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.c b/third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.c
new file mode 100644
index 0000000..c2c2da3
--- /dev/null
+++ b/third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.c
@@ -0,0 +1,203 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// Simple_TextureCubemap.c
+//
+// This is a simple example that draws a sphere with a cubemap image applied.
+//
+#include <stdlib.h>
+#include "Simple_TextureCubemap.h"
+
+///
+// Create a simple cubemap with a 1x1 face with a different
+// color for each face
+static GLuint CreateSimpleTextureCubemap( )
+{
+ GLuint textureId;
+ // Six 1x1 RGB faces
+ GLubyte cubePixels[6][3] =
+ {
+ // Face 0 - Red
+ 255, 0, 0,
+ // Face 1 - Green,
+ 0, 255, 0,
+ // Face 3 - Blue
+ 0, 0, 255,
+ // Face 4 - Yellow
+ 255, 255, 0,
+ // Face 5 - Purple
+ 255, 0, 255,
+ // Face 6 - White
+ 255, 255, 255
+ };
+
+ // Generate a texture object
+ glGenTextures ( 1, &textureId );
+
+ // Bind the texture object
+ glBindTexture ( GL_TEXTURE_CUBE_MAP, textureId );
+
+ // Load the cube face - Positive X
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[0] );
+
+ // Load the cube face - Negative X
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[1] );
+
+ // Load the cube face - Positive Y
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[2] );
+
+ // Load the cube face - Negative Y
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[3] );
+
+ // Load the cube face - Positive Z
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[4] );
+
+ // Load the cube face - Negative Z
+ glTexImage2D ( GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, GL_RGB, 1, 1, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, &cubePixels[5] );
+
+ // Set the filtering mode
+ glTexParameteri ( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+ glTexParameteri ( GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
+
+ return textureId;
+
+}
+
+
+///
+// Initialize the shader and program object
+//
+int stcInit ( ESContext *esContext )
+{
+ STCUserData *userData = esContext->userData;
+ int numSlices = 20;
+ int numVertices = ( (numSlices / 2) + 1 ) * ( numSlices + 1 );
+ GLfloat *vertices = NULL;
+ GLfloat *normals = NULL;
+ GLushort *indices = NULL;
+ GLbyte vShaderStr[] =
+ "attribute vec4 a_position; \n"
+ "attribute vec3 a_normal; \n"
+ "varying vec3 v_normal; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = a_position; \n"
+ " v_normal = a_normal; \n"
+ "} \n";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float; \n"
+ "varying vec3 v_normal; \n"
+ "uniform samplerCube s_texture; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = textureCube( s_texture, v_normal );\n"
+ "} \n";
+
+ // Load the shaders and get a linked program object
+ userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
+
+ // Get the attribute locations
+ userData->positionLoc = glGetAttribLocation ( userData->programObject, "a_position" );
+ userData->normalLoc = glGetAttribLocation ( userData->programObject, "a_normal" );
+
+ // Get the sampler locations
+ userData->samplerLoc = glGetUniformLocation ( userData->programObject, "s_texture" );
+
+ // Load the texture
+ userData->textureId = CreateSimpleTextureCubemap ();
+
+ // Generate the vertex data
+ userData->numIndices = esGenSphere ( numSlices, 0.75f, &vertices, &normals,
+ NULL, &indices );
+ glGenBuffers( 3, userData->vboIds );
+ // Load vertex positions
+ glBindBuffer ( GL_ARRAY_BUFFER, userData->vboIds[0] );
+ glBufferData ( GL_ARRAY_BUFFER, 3 * numVertices * sizeof(GLfloat),
+ vertices, GL_STATIC_DRAW );
+ // Load vertex normals
+ glBindBuffer ( GL_ARRAY_BUFFER, userData->vboIds[1] );
+ glBufferData ( GL_ARRAY_BUFFER, 3 * numVertices * sizeof(GLfloat),
+ normals, GL_STATIC_DRAW );
+ // Load vertex indices
+ glBindBuffer ( GL_ELEMENT_ARRAY_BUFFER, userData->vboIds[2] );
+ glBufferData ( GL_ELEMENT_ARRAY_BUFFER, userData->numIndices * sizeof(GLushort),
+ indices, GL_STATIC_DRAW );
+ if ( vertices != NULL ) free ( vertices );
+ if ( normals != NULL ) free ( normals );
+ if ( indices != NULL ) free ( indices );
+
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+ return TRUE;
+}
+
+///
+// Draw a triangle using the shader pair created in Init()
+//
+void stcDraw ( ESContext *esContext )
+{
+ STCUserData *userData = esContext->userData;
+
+ // Set the viewport
+ glViewport ( 0, 0, esContext->width, esContext->height );
+
+ // Clear the color buffer
+ glClear ( GL_COLOR_BUFFER_BIT );
+
+
+ glCullFace ( GL_BACK );
+ glEnable ( GL_CULL_FACE );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex position
+ glVertexAttribPointer ( userData->positionLoc, 3, GL_FLOAT,
+ GL_FALSE, 0, 0 );
+ // Load the normal
+ glVertexAttribPointer ( userData->normalLoc, 3, GL_FLOAT,
+ GL_FALSE, 0, 0 );
+
+ glEnableVertexAttribArray ( userData->positionLoc );
+ glEnableVertexAttribArray ( userData->normalLoc );
+
+ // Bind the texture
+ glActiveTexture ( GL_TEXTURE0 );
+ glBindTexture ( GL_TEXTURE_CUBE_MAP, userData->textureId );
+
+ // Set the sampler texture unit to 0
+ glUniform1i ( userData->samplerLoc, 0 );
+
+ glDrawElements ( GL_TRIANGLES, userData->numIndices,
+ GL_UNSIGNED_SHORT, 0 );
+}
+
+///
+// Cleanup
+//
+void stcShutDown ( ESContext *esContext )
+{
+ STCUserData *userData = esContext->userData;
+
+ // Delete texture object
+ glDeleteTextures ( 1, &userData->textureId );
+
+ // Delete program object
+ glDeleteProgram ( userData->programObject );
+
+ // Delete vertex buffer objects
+ glDeleteBuffers ( 3, userData->vboIds );
+}
diff --git a/third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.h b/third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.h
new file mode 100644
index 0000000..3169f97
--- /dev/null
+++ b/third_party/gles2_book/Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.h
@@ -0,0 +1,49 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+#ifndef SIMPLE_TEXTURE_CUBEMAP_H
+#define SIMPLE_TEXTURE_CUBEMAP_H
+
+#include "esUtil.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+
+ // Attribute locations
+ GLint positionLoc;
+ GLint normalLoc;
+
+ // Sampler location
+ GLint samplerLoc;
+
+ // Texture handle
+ GLuint textureId;
+
+ // Vertex data
+ int numIndices;
+ GLuint vboIds[3];
+} STCUserData;
+
+extern int stcInit ( ESContext *esContext );
+
+extern void stcDraw ( ESContext *esContext );
+
+extern void stcShutDown ( ESContext *esContext );
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+#endif // SIMPLE_TEXTURE_CUBEMAP_H
diff --git a/third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.c b/third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.c
new file mode 100644
index 0000000..5298283
--- /dev/null
+++ b/third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.c
@@ -0,0 +1,229 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// TextureWrap.c
+//
+// This is an example that demonstrates the three texture
+// wrap modes available on 2D textures
+//
+#include <stdlib.h>
+#include "TextureWrap.h"
+
+///
+// Generate an RGB8 checkerboard image
+//
+static GLubyte* GenCheckImage( int width, int height, int checkSize )
+{
+ int x,
+ y;
+ GLubyte *pixels = malloc( width * height * 3 );
+
+ if ( pixels == NULL )
+ return NULL;
+
+ for ( y = 0; y < height; y++ )
+ for ( x = 0; x < width; x++ )
+ {
+ GLubyte rColor = 0;
+ GLubyte bColor = 0;
+
+ if ( ( x / checkSize ) % 2 == 0 )
+ {
+ rColor = 255 * ( ( y / checkSize ) % 2 );
+ bColor = 255 * ( 1 - ( ( y / checkSize ) % 2 ) );
+ }
+ else
+ {
+ bColor = 255 * ( ( y / checkSize ) % 2 );
+ rColor = 255 * ( 1 - ( ( y / checkSize ) % 2 ) );
+ }
+
+ pixels[(y * height + x) * 3] = rColor;
+ pixels[(y * height + x) * 3 + 1] = 0;
+ pixels[(y * height + x) * 3 + 2] = bColor;
+ }
+
+ return pixels;
+}
+
+///
+// Create a mipmapped 2D texture image
+//
+static GLuint CreateTexture2D( )
+{
+ // Texture object handle
+ GLuint textureId;
+ int width = 256,
+ height = 256;
+ GLubyte *pixels;
+
+ pixels = GenCheckImage( width, height, 64 );
+ if ( pixels == NULL )
+ return 0;
+
+ // Generate a texture object
+ glGenTextures ( 1, &textureId );
+
+ // Bind the texture object
+ glBindTexture ( GL_TEXTURE_2D, textureId );
+
+ // Load mipmap level 0
+ glTexImage2D ( GL_TEXTURE_2D, 0, GL_RGB, width, height,
+ 0, GL_RGB, GL_UNSIGNED_BYTE, pixels );
+
+ // Set the filtering mode
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+
+ return textureId;
+
+}
+
+
+///
+// Initialize the shader and program object
+//
+int twInit ( ESContext *esContext )
+{
+ TWUserData *userData = esContext->userData;
+ GLbyte vShaderStr[] =
+ "uniform float u_offset; \n"
+ "attribute vec4 a_position; \n"
+ "attribute vec2 a_texCoord; \n"
+ "varying vec2 v_texCoord; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = a_position; \n"
+ " gl_Position.x += u_offset;\n"
+ " v_texCoord = a_texCoord; \n"
+ "} \n";
+
+ GLbyte fShaderStr[] =
+ "precision mediump float; \n"
+ "varying vec2 v_texCoord; \n"
+ "uniform sampler2D s_texture; \n"
+ "void main() \n"
+ "{ \n"
+ " gl_FragColor = texture2D( s_texture, v_texCoord );\n"
+ "} \n";
+
+ GLfloat vVertices[] = { -0.3f, 0.3f, 0.0f, 1.0f, // Position 0
+ -1.0f, -1.0f, // TexCoord 0
+ -0.3f, -0.3f, 0.0f, 1.0f, // Position 1
+ -1.0f, 2.0f, // TexCoord 1
+ 0.3f, -0.3f, 0.0f, 1.0f, // Position 2
+ 2.0f, 2.0f, // TexCoord 2
+ 0.3f, 0.3f, 0.0f, 1.0f, // Position 3
+ 2.0f, -1.0f // TexCoord 3
+ };
+ GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
+
+ // Load the shaders and get a linked program object
+ userData->programObject = esLoadProgram ( vShaderStr, fShaderStr );
+
+ // Get the attribute locations
+ userData->positionLoc = glGetAttribLocation ( userData->programObject, "a_position" );
+ userData->texCoordLoc = glGetAttribLocation ( userData->programObject, "a_texCoord" );
+
+ // Get the sampler location
+ userData->samplerLoc = glGetUniformLocation ( userData->programObject, "s_texture" );
+
+ // Get the offset location
+ userData->offsetLoc = glGetUniformLocation( userData->programObject, "u_offset" );
+
+ // Load the texture
+ userData->textureId = CreateTexture2D ();
+
+ // Load vertex data
+ glGenBuffers ( 2, userData->vboIds );
+ glBindBuffer ( GL_ARRAY_BUFFER, userData->vboIds[0] );
+ glBufferData ( GL_ARRAY_BUFFER, sizeof(vVertices),
+ vVertices, GL_STATIC_DRAW );
+ glBindBuffer ( GL_ELEMENT_ARRAY_BUFFER, userData->vboIds[1] );
+ glBufferData ( GL_ELEMENT_ARRAY_BUFFER, sizeof(indices),
+ indices, GL_STATIC_DRAW );
+
+ glClearColor ( 0.0f, 0.0f, 0.0f, 0.0f );
+ return TRUE;
+}
+
+///
+// Draw a triangle using the shader pair created in Init()
+//
+#define VTX_POS_SIZE 4
+#define VTX_TEX_SIZE 2
+#define VTX_STRIDE (6 * sizeof(GLfloat))
+void twDraw ( ESContext *esContext )
+{
+ TWUserData *userData = esContext->userData;
+ GLuint offset = 0;
+
+ // Set the viewport
+ glViewport ( 0, 0, esContext->width, esContext->height );
+
+ // Clear the color buffer
+ glClear ( GL_COLOR_BUFFER_BIT );
+
+ // Use the program object
+ glUseProgram ( userData->programObject );
+
+ // Load the vertex position
+ glVertexAttribPointer ( userData->positionLoc, VTX_POS_SIZE, GL_FLOAT,
+ GL_FALSE, VTX_STRIDE, (GLvoid*) offset );
+ // Load the texture coordinate
+ offset += VTX_POS_SIZE * sizeof(GLfloat);
+ glVertexAttribPointer ( userData->texCoordLoc, VTX_TEX_SIZE, GL_FLOAT,
+ GL_FALSE, VTX_STRIDE, (GLvoid*) offset );
+
+ glEnableVertexAttribArray ( userData->positionLoc );
+ glEnableVertexAttribArray ( userData->texCoordLoc );
+
+ // Bind the texture
+ glActiveTexture ( GL_TEXTURE0 );
+ glBindTexture ( GL_TEXTURE_2D, userData->textureId );
+
+ // Set the sampler texture unit to 0
+ glUniform1i ( userData->samplerLoc, 0 );
+
+ // Draw quad with repeat wrap mode
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
+ glUniform1f ( userData->offsetLoc, -0.7f );
+ glDrawElements ( GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0 );
+
+ // Draw quad with clamp to edge wrap mode
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
+ glUniform1f ( userData->offsetLoc, 0.0f );
+ glDrawElements ( GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0 );
+
+ // Draw quad with mirrored repeat
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT );
+ glTexParameteri ( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT );
+ glUniform1f ( userData->offsetLoc, 0.7f );
+ glDrawElements ( GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0 );
+}
+
+///
+// Cleanup
+//
+void twShutDown ( ESContext *esContext )
+{
+ TWUserData *userData = esContext->userData;
+
+ // Delete texture object
+ glDeleteTextures ( 1, &userData->textureId );
+
+ // Delete program object
+ glDeleteProgram ( userData->programObject );
+
+ // Delete vertex buffer objects
+ glDeleteBuffers ( 2, userData->vboIds );
+}
diff --git a/third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.h b/third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.h
new file mode 100644
index 0000000..0067e67
--- /dev/null
+++ b/third_party/gles2_book/Chapter_9/TextureWrap/TextureWrap.h
@@ -0,0 +1,52 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+#ifndef TEXTURE_WRAP_H
+#define TEXTURE_WRAP_H
+
+#include "esUtil.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+typedef struct
+{
+ // Handle to a program object
+ GLuint programObject;
+
+ // Attribute locations
+ GLint positionLoc;
+ GLint texCoordLoc;
+
+ // Sampler location
+ GLint samplerLoc;
+
+ // Offset location
+ GLint offsetLoc;
+
+ // Texture handle
+ GLuint textureId;
+
+ // Vertex buffer object handle
+ GLuint vboIds[2];
+
+} TWUserData;
+
+extern int twInit ( ESContext *esContext );
+
+extern void twDraw ( ESContext *esContext );
+
+extern void twShutDown ( ESContext *esContext );
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+#endif // TEXTURE_WRAP_H
diff --git a/third_party/gles2_book/Common/Include/esUtil.h b/third_party/gles2_book/Common/Include/esUtil.h
new file mode 100644
index 0000000..12045a2
--- /dev/null
+++ b/third_party/gles2_book/Common/Include/esUtil.h
@@ -0,0 +1,178 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+//
+/// \file ESUtil.h
+/// \brief A utility library for OpenGL ES. This library provides a
+/// basic common framework for the example applications in the
+/// OpenGL ES 2.0 Programming Guide.
+//
+#ifndef ESUTIL_H
+#define ESUTIL_H
+
+#include <GLES2/gl2.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#ifndef FALSE
+#define FALSE 0
+#endif // FALSE
+#ifndef TRUE
+#define TRUE 1
+#endif // TRUE
+
+typedef struct
+{
+ GLfloat m[4][4];
+} ESMatrix;
+
+typedef struct
+{
+ /// Put your user data here...
+ void* userData;
+
+ /// Window width
+ GLint width;
+
+ /// Window height
+ GLint height;
+} ESContext;
+
+//
+///
+/// \brief Initialize ES framework context. This must be called before calling any other functions.
+/// \param esContext Application context
+//
+extern void esInitContext ( ESContext *esContext );
+
+//
+/// \brief Log a message to the debug output for the platform
+/// \param formatStr Format string for error log.
+//
+extern void esLogMessage ( const char *formatStr, ... );
+
+//
+///
+/// \brief Load a shader, check for compile errors, print error messages to output log
+/// \param type Type of shader (GL_VERTEX_SHADER or GL_FRAGMENT_SHADER)
+/// \param shaderSrc Shader source string
+/// \return A new shader object on success, 0 on failure
+//
+extern GLuint esLoadShader ( GLenum type, const char *shaderSrc );
+
+//
+///
+/// \brief Load a vertex and fragment shader, create a program object, link program.
+/// Errors output to log.
+/// \param vertShaderSrc Vertex shader source code
+/// \param fragShaderSrc Fragment shader source code
+/// \return A new program object linked with the vertex/fragment shader pair, 0 on failure
+//
+extern GLuint esLoadProgram ( const char *vertShaderSrc, const char *fragShaderSrc );
+
+
+//
+/// \brief Generates geometry for a sphere. Allocates memory for the vertex data and stores
+/// the results in the arrays. Generate index list for a TRIANGLE_STRIP
+/// \param numSlices The number of slices in the sphere
+/// \param vertices If not NULL, will contain array of float3 positions
+/// \param normals If not NULL, will contain array of float3 normals
+/// \param texCoords If not NULL, will contain array of float2 texCoords
+/// \param indices If not NULL, will contain the array of indices for the triangle strip
+/// \return The number of indices required for rendering the buffers (the number of indices stored in the indices array
+/// if it is not NULL ) as a GL_TRIANGLE_STRIP
+//
+extern int esGenSphere ( int numSlices, float radius, GLfloat **vertices, GLfloat **normals,
+ GLfloat **texCoords, GLushort **indices );
+
+//
+/// \brief Generates geometry for a cube. Allocates memory for the vertex data and stores
+/// the results in the arrays. Generate index list for a TRIANGLES
+/// \param scale The size of the cube, use 1.0 for a unit cube.
+/// \param vertices If not NULL, will contain array of float3 positions
+/// \param normals If not NULL, will contain array of float3 normals
+/// \param texCoords If not NULL, will contain array of float2 texCoords
+/// \param indices If not NULL, will contain the array of indices for the triangle strip
+/// \return The number of indices required for rendering the buffers (the number of indices stored in the indices array
+/// if it is not NULL ) as a GL_TRIANGLES
+//
+extern int esGenCube ( float scale, GLfloat **vertices, GLfloat **normals,
+ GLfloat **texCoords, GLushort **indices );
+
+//
+/// \brief multiply matrix specified by result with a scaling matrix and return new matrix in result
+/// \param result Specifies the input matrix. Scaled matrix is returned in result.
+/// \param sx, sy, sz Scale factors along the x, y and z axes respectively
+//
+extern void esScale(ESMatrix *result, GLfloat sx, GLfloat sy, GLfloat sz);
+
+//
+/// \brief multiply matrix specified by result with a translation matrix and return new matrix in result
+/// \param result Specifies the input matrix. Translated matrix is returned in result.
+/// \param tx, ty, tz Scale factors along the x, y and z axes respectively
+//
+extern void esTranslate(ESMatrix *result, GLfloat tx, GLfloat ty, GLfloat tz);
+
+//
+/// \brief multiply matrix specified by result with a rotation matrix and return new matrix in result
+/// \param result Specifies the input matrix. Rotated matrix is returned in result.
+/// \param angle Specifies the angle of rotation, in degrees.
+/// \param x, y, z Specify the x, y and z coordinates of a vector, respectively
+//
+extern void esRotate(ESMatrix *result, GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+
+//
+// \brief multiply matrix specified by result with a perspective matrix and return new matrix in result
+/// \param result Specifies the input matrix. new matrix is returned in result.
+/// \param left, right Coordinates for the left and right vertical clipping planes
+/// \param bottom, top Coordinates for the bottom and top horizontal clipping planes
+/// \param nearZ, farZ Distances to the near and far depth clipping planes. Both distances must be positive.
+//
+extern void esFrustum(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ);
+
+//
+/// \brief multiply matrix specified by result with a perspective matrix and return new matrix in result
+/// \param result Specifies the input matrix. new matrix is returned in result.
+/// \param fovy Field of view y angle in degrees
+/// \param aspect Aspect ratio of screen
+/// \param nearZ Near plane distance
+/// \param farZ Far plane distance
+//
+extern void esPerspective(ESMatrix *result, float fovy, float aspect, float nearZ, float farZ);
+
+//
+/// \brief multiply matrix specified by result with a perspective matrix and return new matrix in result
+/// \param result Specifies the input matrix. new matrix is returned in result.
+/// \param left, right Coordinates for the left and right vertical clipping planes
+/// \param bottom, top Coordinates for the bottom and top horizontal clipping planes
+/// \param nearZ, farZ Distances to the near and far depth clipping planes. These values are negative if plane is behind the viewer
+//
+extern void esOrtho(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ);
+
+//
+/// \brief perform the following operation - result matrix = srcA matrix * srcB matrix
+/// \param result Returns multiplied matrix
+/// \param srcA, srcB Input matrices to be multiplied
+//
+extern void esMatrixMultiply(ESMatrix *result, ESMatrix *srcA, ESMatrix *srcB);
+
+//
+//// \brief return an indentity matrix
+//// \param result returns identity matrix
+//
+extern void esMatrixLoadIdentity(ESMatrix *result);
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif // ESUTIL_H
diff --git a/third_party/gles2_book/Common/Source/esShader.c b/third_party/gles2_book/Common/Source/esShader.c
new file mode 100644
index 0000000..80c1376
--- /dev/null
+++ b/third_party/gles2_book/Common/Source/esShader.c
@@ -0,0 +1,155 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// ESShader.c
+//
+// Utility functions for loading shaders and creating program objects.
+//
+
+///
+// Includes
+//
+#include "esUtil.h"
+#include <stdlib.h>
+
+//////////////////////////////////////////////////////////////////
+//
+// Private Functions
+//
+//
+
+
+
+//////////////////////////////////////////////////////////////////
+//
+// Public Functions
+//
+//
+
+//
+///
+/// \brief Load a shader, check for compile errors, print error messages to output log
+/// \param type Type of shader (GL_VERTEX_SHADER or GL_FRAGMENT_SHADER)
+/// \param shaderSrc Shader source string
+/// \return A new shader object on success, 0 on failure
+//
+GLuint esLoadShader ( GLenum type, const char *shaderSrc )
+{
+ GLuint shader = 0;
+ GLint compiled = 0;
+
+ // Create the shader object
+ shader = glCreateShader ( type );
+
+ if ( shader == 0 )
+ return 0;
+
+ // Load the shader source
+ glShaderSource ( shader, 1, &shaderSrc, NULL );
+
+ // Compile the shader
+ glCompileShader ( shader );
+
+ // Check the compile status
+ glGetShaderiv ( shader, GL_COMPILE_STATUS, &compiled );
+
+ if ( !compiled )
+ {
+ GLint infoLen = 0;
+
+ glGetShaderiv ( shader, GL_INFO_LOG_LENGTH, &infoLen );
+
+ if ( infoLen > 1 )
+ {
+ char* infoLog = malloc (sizeof(char) * infoLen );
+
+ glGetShaderInfoLog ( shader, infoLen, NULL, infoLog );
+ esLogMessage ( "Error compiling shader:\n%s\n", infoLog );
+
+ free ( infoLog );
+ }
+
+ glDeleteShader ( shader );
+ return 0;
+ }
+
+ return shader;
+
+}
+
+
+//
+///
+/// \brief Load a vertex and fragment shader, create a program object, link program.
+// Errors output to log.
+/// \param vertShaderSrc Vertex shader source code
+/// \param fragShaderSrc Fragment shader source code
+/// \return A new program object linked with the vertex/fragment shader pair, 0 on failure
+//
+GLuint esLoadProgram ( const char *vertShaderSrc, const char *fragShaderSrc )
+{
+ GLuint vertexShader = 0;
+ GLuint fragmentShader = 0;
+ GLuint programObject = 0;
+ GLint linked = 0;
+
+ // Load the vertex/fragment shaders
+ vertexShader = esLoadShader ( GL_VERTEX_SHADER, vertShaderSrc );
+ if ( vertexShader == 0 )
+ return 0;
+
+ fragmentShader = esLoadShader ( GL_FRAGMENT_SHADER, fragShaderSrc );
+ if ( fragmentShader == 0 )
+ {
+ glDeleteShader( vertexShader );
+ return 0;
+ }
+
+ // Create the program object
+ programObject = glCreateProgram ( );
+
+ if ( programObject == 0 )
+ return 0;
+
+ glAttachShader ( programObject, vertexShader );
+ glAttachShader ( programObject, fragmentShader );
+
+ // Link the program
+ glLinkProgram ( programObject );
+
+ // Check the link status
+ glGetProgramiv ( programObject, GL_LINK_STATUS, &linked );
+
+ if ( !linked )
+ {
+ GLint infoLen = 0;
+
+ glGetProgramiv ( programObject, GL_INFO_LOG_LENGTH, &infoLen );
+
+ if ( infoLen > 1 )
+ {
+ char* infoLog = malloc (sizeof(char) * infoLen );
+
+ glGetProgramInfoLog ( programObject, infoLen, NULL, infoLog );
+ esLogMessage ( "Error linking program:\n%s\n", infoLog );
+
+ free ( infoLog );
+ }
+
+ glDeleteProgram ( programObject );
+ return 0;
+ }
+
+ // Free up no longer needed shader resources
+ glDeleteShader ( vertexShader );
+ glDeleteShader ( fragmentShader );
+
+ return programObject;
+}
diff --git a/third_party/gles2_book/Common/Source/esShapes.c b/third_party/gles2_book/Common/Source/esShapes.c
new file mode 100644
index 0000000..dee7efb
--- /dev/null
+++ b/third_party/gles2_book/Common/Source/esShapes.c
@@ -0,0 +1,280 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// ESShapes.c
+//
+// Utility functions for generating shapes
+//
+
+///
+// Includes
+//
+#include "esUtil.h"
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+///
+// Defines
+//
+#define ES_PI (3.14159265f)
+
+//////////////////////////////////////////////////////////////////
+//
+// Private Functions
+//
+//
+
+
+
+//////////////////////////////////////////////////////////////////
+//
+// Public Functions
+//
+//
+
+//
+/// \brief Generates geometry for a sphere. Allocates memory for the vertex data and stores
+/// the results in the arrays. Generate index list for a TRIANGLE_STRIP
+/// \param numSlices The number of slices in the sphere
+/// \param vertices If not NULL, will contain array of float3 positions
+/// \param normals If not NULL, will contain array of float3 normals
+/// \param texCoords If not NULL, will contain array of float2 texCoords
+/// \param indices If not NULL, will contain the array of indices for the triangle strip
+/// \return The number of indices required for rendering the buffers (the number of indices stored in the indices array
+/// if it is not NULL ) as a GL_TRIANGLE_STRIP
+//
+int esGenSphere ( int numSlices, float radius, GLfloat **vertices, GLfloat **normals,
+ GLfloat **texCoords, GLushort **indices )
+{
+ int i;
+ int j;
+ int numParallels = numSlices / 2;
+ int numVertices = ( numParallels + 1 ) * ( numSlices + 1 );
+ int numIndices = numParallels * numSlices * 6;
+ float angleStep = (2.0f * ES_PI) / ((float) numSlices);
+
+ // Allocate memory for buffers
+ if ( vertices != NULL )
+ *vertices = malloc ( sizeof(GLfloat) * 3 * numVertices );
+
+ if ( normals != NULL )
+ *normals = malloc ( sizeof(GLfloat) * 3 * numVertices );
+
+ if ( texCoords != NULL )
+ *texCoords = malloc ( sizeof(GLfloat) * 2 * numVertices );
+
+ if ( indices != NULL )
+ *indices = malloc ( sizeof(GLushort) * numIndices );
+
+ for ( i = 0; i < numParallels + 1; i++ )
+ {
+ for ( j = 0; j < numSlices + 1; j++ )
+ {
+ int vertex = ( i * (numSlices + 1) + j ) * 3;
+
+ if ( vertices )
+ {
+ (*vertices)[vertex + 0] = radius * sinf ( angleStep * (float)i ) *
+ sinf ( angleStep * (float)j );
+ (*vertices)[vertex + 1] = radius * cosf ( angleStep * (float)i );
+ (*vertices)[vertex + 2] = radius * sinf ( angleStep * (float)i ) *
+ cosf ( angleStep * (float)j );
+ }
+
+ if ( normals )
+ {
+ (*normals)[vertex + 0] = (*vertices)[vertex + 0] / radius;
+ (*normals)[vertex + 1] = (*vertices)[vertex + 1] / radius;
+ (*normals)[vertex + 2] = (*vertices)[vertex + 2] / radius;
+ }
+
+ if ( texCoords )
+ {
+ int texIndex = ( i * (numSlices + 1) + j ) * 2;
+ (*texCoords)[texIndex + 0] = (float) j / (float) numSlices;
+ (*texCoords)[texIndex + 1] = ( 1.0f - (float) i ) / (float) (numParallels - 1 );
+ }
+ }
+ }
+
+ // Generate the indices
+ if ( indices != NULL )
+ {
+ GLushort *indexBuf = (*indices);
+ for ( i = 0; i < numParallels ; i++ )
+ {
+ for ( j = 0; j < numSlices; j++ )
+ {
+ *indexBuf++ = i * ( numSlices + 1 ) + j;
+ *indexBuf++ = ( i + 1 ) * ( numSlices + 1 ) + j;
+ *indexBuf++ = ( i + 1 ) * ( numSlices + 1 ) + ( j + 1 );
+
+ *indexBuf++ = i * ( numSlices + 1 ) + j;
+ *indexBuf++ = ( i + 1 ) * ( numSlices + 1 ) + ( j + 1 );
+ *indexBuf++ = i * ( numSlices + 1 ) + ( j + 1 );
+ }
+ }
+ }
+
+ return numIndices;
+}
+
+//
+/// \brief Generates geometry for a cube. Allocates memory for the vertex data and stores
+/// the results in the arrays. Generate index list for a TRIANGLES
+/// \param scale The size of the cube, use 1.0 for a unit cube.
+/// \param vertices If not NULL, will contain array of float3 positions
+/// \param normals If not NULL, will contain array of float3 normals
+/// \param texCoords If not NULL, will contain array of float2 texCoords
+/// \param indices If not NULL, will contain the array of indices for the triangle strip
+/// \return The number of indices required for rendering the buffers (the number of indices stored in the indices array
+/// if it is not NULL ) as a GL_TRIANGLE_STRIP
+//
+int esGenCube ( float scale, GLfloat **vertices, GLfloat **normals,
+ GLfloat **texCoords, GLushort **indices )
+{
+ int i;
+ int numVertices = 24;
+ int numIndices = 36;
+
+ GLfloat cubeVerts[] =
+ {
+ -0.5f, -0.5f, -0.5f,
+ -0.5f, -0.5f, 0.5f,
+ 0.5f, -0.5f, 0.5f,
+ 0.5f, -0.5f, -0.5f,
+ -0.5f, 0.5f, -0.5f,
+ -0.5f, 0.5f, 0.5f,
+ 0.5f, 0.5f, 0.5f,
+ 0.5f, 0.5f, -0.5f,
+ -0.5f, -0.5f, -0.5f,
+ -0.5f, 0.5f, -0.5f,
+ 0.5f, 0.5f, -0.5f,
+ 0.5f, -0.5f, -0.5f,
+ -0.5f, -0.5f, 0.5f,
+ -0.5f, 0.5f, 0.5f,
+ 0.5f, 0.5f, 0.5f,
+ 0.5f, -0.5f, 0.5f,
+ -0.5f, -0.5f, -0.5f,
+ -0.5f, -0.5f, 0.5f,
+ -0.5f, 0.5f, 0.5f,
+ -0.5f, 0.5f, -0.5f,
+ 0.5f, -0.5f, -0.5f,
+ 0.5f, -0.5f, 0.5f,
+ 0.5f, 0.5f, 0.5f,
+ 0.5f, 0.5f, -0.5f,
+ };
+
+ GLfloat cubeNormals[] =
+ {
+ 0.0f, -1.0f, 0.0f,
+ 0.0f, -1.0f, 0.0f,
+ 0.0f, -1.0f, 0.0f,
+ 0.0f, -1.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f,
+ 0.0f, 0.0f, -1.0f,
+ 0.0f, 0.0f, -1.0f,
+ 0.0f, 0.0f, -1.0f,
+ 0.0f, 0.0f, -1.0f,
+ 0.0f, 0.0f, 1.0f,
+ 0.0f, 0.0f, 1.0f,
+ 0.0f, 0.0f, 1.0f,
+ 0.0f, 0.0f, 1.0f,
+ -1.0f, 0.0f, 0.0f,
+ -1.0f, 0.0f, 0.0f,
+ -1.0f, 0.0f, 0.0f,
+ -1.0f, 0.0f, 0.0f,
+ 1.0f, 0.0f, 0.0f,
+ 1.0f, 0.0f, 0.0f,
+ 1.0f, 0.0f, 0.0f,
+ 1.0f, 0.0f, 0.0f,
+ };
+
+ GLfloat cubeTex[] =
+ {
+ 0.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ 1.0f, 0.0f,
+ 1.0f, 0.0f,
+ 1.0f, 1.0f,
+ 0.0f, 1.0f,
+ 0.0f, 0.0f,
+ 0.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ 1.0f, 0.0f,
+ 0.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ 1.0f, 0.0f,
+ 0.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ 1.0f, 0.0f,
+ 0.0f, 0.0f,
+ 0.0f, 1.0f,
+ 1.0f, 1.0f,
+ 1.0f, 0.0f,
+ };
+
+ // Allocate memory for buffers
+ if ( vertices != NULL )
+ {
+ *vertices = malloc ( sizeof(GLfloat) * 3 * numVertices );
+ memcpy( *vertices, cubeVerts, sizeof( cubeVerts ) );
+ for ( i = 0; i < numVertices; i++ )
+ {
+ (*vertices)[i] *= scale;
+ }
+ }
+
+ if ( normals != NULL )
+ {
+ *normals = malloc ( sizeof(GLfloat) * 3 * numVertices );
+ memcpy( *normals, cubeNormals, sizeof( cubeNormals ) );
+ }
+
+ if ( texCoords != NULL )
+ {
+ *texCoords = malloc ( sizeof(GLfloat) * 2 * numVertices );
+ memcpy( *texCoords, cubeTex, sizeof( cubeTex ) ) ;
+ }
+
+
+ // Generate the indices
+ if ( indices != NULL )
+ {
+ GLushort cubeIndices[] =
+ {
+ 0, 2, 1,
+ 0, 3, 2,
+ 4, 5, 6,
+ 4, 6, 7,
+ 8, 9, 10,
+ 8, 10, 11,
+ 12, 15, 14,
+ 12, 14, 13,
+ 16, 17, 18,
+ 16, 18, 19,
+ 20, 23, 22,
+ 20, 22, 21
+ };
+
+ *indices = malloc ( sizeof(GLushort) * numIndices );
+ memcpy( *indices, cubeIndices, sizeof( cubeIndices ) );
+ }
+
+ return numIndices;
+}
diff --git a/third_party/gles2_book/Common/Source/esTransform.c b/third_party/gles2_book/Common/Source/esTransform.c
new file mode 100644
index 0000000..91eef80
--- /dev/null
+++ b/third_party/gles2_book/Common/Source/esTransform.c
@@ -0,0 +1,204 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// ESUtil.c
+//
+// A utility library for OpenGL ES. This library provides a
+// basic common framework for the example applications in the
+// OpenGL ES 2.0 Programming Guide.
+//
+
+///
+// Includes
+//
+#include "esUtil.h"
+#include <math.h>
+#include <string.h>
+
+#define PI 3.1415926535897932384626433832795f
+
+void esScale(ESMatrix *result, GLfloat sx, GLfloat sy, GLfloat sz)
+{
+ result->m[0][0] *= sx;
+ result->m[0][1] *= sx;
+ result->m[0][2] *= sx;
+ result->m[0][3] *= sx;
+
+ result->m[1][0] *= sy;
+ result->m[1][1] *= sy;
+ result->m[1][2] *= sy;
+ result->m[1][3] *= sy;
+
+ result->m[2][0] *= sz;
+ result->m[2][1] *= sz;
+ result->m[2][2] *= sz;
+ result->m[2][3] *= sz;
+}
+
+void esTranslate(ESMatrix *result, GLfloat tx, GLfloat ty, GLfloat tz)
+{
+ result->m[3][0] += (result->m[0][0] * tx + result->m[1][0] * ty + result->m[2][0] * tz);
+ result->m[3][1] += (result->m[0][1] * tx + result->m[1][1] * ty + result->m[2][1] * tz);
+ result->m[3][2] += (result->m[0][2] * tx + result->m[1][2] * ty + result->m[2][2] * tz);
+ result->m[3][3] += (result->m[0][3] * tx + result->m[1][3] * ty + result->m[2][3] * tz);
+}
+
+void esRotate(ESMatrix *result, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
+{
+ GLfloat sinAngle, cosAngle;
+ GLfloat mag = sqrtf(x * x + y * y + z * z);
+
+ sinAngle = sinf ( angle * PI / 180.0f );
+ cosAngle = cosf ( angle * PI / 180.0f );
+ if ( mag > 0.0f )
+ {
+ GLfloat xx, yy, zz, xy, yz, zx, xs, ys, zs;
+ GLfloat oneMinusCos;
+ ESMatrix rotMat;
+
+ x /= mag;
+ y /= mag;
+ z /= mag;
+
+ xx = x * x;
+ yy = y * y;
+ zz = z * z;
+ xy = x * y;
+ yz = y * z;
+ zx = z * x;
+ xs = x * sinAngle;
+ ys = y * sinAngle;
+ zs = z * sinAngle;
+ oneMinusCos = 1.0f - cosAngle;
+
+ rotMat.m[0][0] = (oneMinusCos * xx) + cosAngle;
+ rotMat.m[0][1] = (oneMinusCos * xy) - zs;
+ rotMat.m[0][2] = (oneMinusCos * zx) + ys;
+ rotMat.m[0][3] = 0.0F;
+
+ rotMat.m[1][0] = (oneMinusCos * xy) + zs;
+ rotMat.m[1][1] = (oneMinusCos * yy) + cosAngle;
+ rotMat.m[1][2] = (oneMinusCos * yz) - xs;
+ rotMat.m[1][3] = 0.0F;
+
+ rotMat.m[2][0] = (oneMinusCos * zx) - ys;
+ rotMat.m[2][1] = (oneMinusCos * yz) + xs;
+ rotMat.m[2][2] = (oneMinusCos * zz) + cosAngle;
+ rotMat.m[2][3] = 0.0F;
+
+ rotMat.m[3][0] = 0.0F;
+ rotMat.m[3][1] = 0.0F;
+ rotMat.m[3][2] = 0.0F;
+ rotMat.m[3][3] = 1.0F;
+
+ esMatrixMultiply( result, &rotMat, result );
+ }
+}
+
+void esFrustum(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ)
+{
+ float deltaX = right - left;
+ float deltaY = top - bottom;
+ float deltaZ = farZ - nearZ;
+ ESMatrix frust;
+
+ if ( (nearZ <= 0.0f) || (farZ <= 0.0f) ||
+ (deltaX <= 0.0f) || (deltaY <= 0.0f) || (deltaZ <= 0.0f) )
+ return;
+
+ frust.m[0][0] = 2.0f * nearZ / deltaX;
+ frust.m[0][1] = frust.m[0][2] = frust.m[0][3] = 0.0f;
+
+ frust.m[1][1] = 2.0f * nearZ / deltaY;
+ frust.m[1][0] = frust.m[1][2] = frust.m[1][3] = 0.0f;
+
+ frust.m[2][0] = (right + left) / deltaX;
+ frust.m[2][1] = (top + bottom) / deltaY;
+ frust.m[2][2] = -(nearZ + farZ) / deltaZ;
+ frust.m[2][3] = -1.0f;
+
+ frust.m[3][2] = -2.0f * nearZ * farZ / deltaZ;
+ frust.m[3][0] = frust.m[3][1] = frust.m[3][3] = 0.0f;
+
+ esMatrixMultiply(result, &frust, result);
+}
+
+
+void esPerspective(ESMatrix *result, float fovy, float aspect, float nearZ, float farZ)
+{
+ GLfloat frustumW, frustumH;
+
+ frustumH = tanf( fovy / 360.0f * PI ) * nearZ;
+ frustumW = frustumH * aspect;
+
+ esFrustum( result, -frustumW, frustumW, -frustumH, frustumH, nearZ, farZ );
+}
+
+void esOrtho(ESMatrix *result, float left, float right, float bottom, float top, float nearZ, float farZ)
+{
+ float deltaX = right - left;
+ float deltaY = top - bottom;
+ float deltaZ = farZ - nearZ;
+ ESMatrix ortho;
+
+ if ( (deltaX == 0.0f) || (deltaY == 0.0f) || (deltaZ == 0.0f) )
+ return;
+
+ esMatrixLoadIdentity(&ortho);
+ ortho.m[0][0] = 2.0f / deltaX;
+ ortho.m[3][0] = -(right + left) / deltaX;
+ ortho.m[1][1] = 2.0f / deltaY;
+ ortho.m[3][1] = -(top + bottom) / deltaY;
+ ortho.m[2][2] = -2.0f / deltaZ;
+ ortho.m[3][2] = -(nearZ + farZ) / deltaZ;
+
+ esMatrixMultiply(result, &ortho, result);
+}
+
+
+void esMatrixMultiply(ESMatrix *result, ESMatrix *srcA, ESMatrix *srcB)
+{
+ ESMatrix tmp;
+ int i;
+
+ for (i=0; i<4; i++)
+ {
+ tmp.m[i][0] = (srcA->m[i][0] * srcB->m[0][0]) +
+ (srcA->m[i][1] * srcB->m[1][0]) +
+ (srcA->m[i][2] * srcB->m[2][0]) +
+ (srcA->m[i][3] * srcB->m[3][0]) ;
+
+ tmp.m[i][1] = (srcA->m[i][0] * srcB->m[0][1]) +
+ (srcA->m[i][1] * srcB->m[1][1]) +
+ (srcA->m[i][2] * srcB->m[2][1]) +
+ (srcA->m[i][3] * srcB->m[3][1]) ;
+
+ tmp.m[i][2] = (srcA->m[i][0] * srcB->m[0][2]) +
+ (srcA->m[i][1] * srcB->m[1][2]) +
+ (srcA->m[i][2] * srcB->m[2][2]) +
+ (srcA->m[i][3] * srcB->m[3][2]) ;
+
+ tmp.m[i][3] = (srcA->m[i][0] * srcB->m[0][3]) +
+ (srcA->m[i][1] * srcB->m[1][3]) +
+ (srcA->m[i][2] * srcB->m[2][3]) +
+ (srcA->m[i][3] * srcB->m[3][3]) ;
+ }
+ memcpy(result, &tmp, sizeof(ESMatrix));
+}
+
+
+void esMatrixLoadIdentity(ESMatrix *result)
+{
+ memset(result, 0x0, sizeof(ESMatrix));
+ result->m[0][0] = 1.0f;
+ result->m[1][1] = 1.0f;
+ result->m[2][2] = 1.0f;
+ result->m[3][3] = 1.0f;
+}
diff --git a/third_party/gles2_book/Common/Source/esUtil.c b/third_party/gles2_book/Common/Source/esUtil.c
new file mode 100644
index 0000000..cb64a29
--- /dev/null
+++ b/third_party/gles2_book/Common/Source/esUtil.c
@@ -0,0 +1,61 @@
+//
+// Book: OpenGL(R) ES 2.0 Programming Guide
+// Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+// ISBN-10: 0321502795
+// ISBN-13: 9780321502797
+// Publisher: Addison-Wesley Professional
+// URLs: http://safari.informit.com/9780321563835
+// http://www.opengles-book.com
+//
+
+// ESUtil.c
+//
+// A utility library for OpenGL ES. This library provides a
+// basic common framework for the example applications in the
+// OpenGL ES 2.0 Programming Guide.
+//
+
+///
+// Includes
+//
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+
+#include <GLES2/gl2.h>
+
+#include "esUtil.h"
+
+///
+// esInitContext()
+//
+// Initialize ES utility context. This must be called before calling any other
+// functions.
+//
+void esInitContext ( ESContext *esContext )
+{
+ if ( esContext != NULL )
+ {
+ memset( esContext, 0, sizeof( ESContext) );
+ }
+}
+
+///
+// esLogMessage()
+//
+// Log an error message to the debug output for the platform
+//
+void esLogMessage ( const char *formatStr, ... )
+{
+ va_list params;
+ char buf[BUFSIZ];
+
+ va_start ( params, formatStr );
+ vsprintf ( buf, formatStr, params );
+
+ printf ( "%s", buf );
+
+ va_end ( params );
+}
+
diff --git a/third_party/gles2_book/LICENSE b/third_party/gles2_book/LICENSE
new file mode 100644
index 0000000..dc41f2f
--- /dev/null
+++ b/third_party/gles2_book/LICENSE
@@ -0,0 +1,7 @@
+Book: OpenGL(R) ES 2.0 Programming Guide
+Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+ISBN-10: 0321502795
+ISBN-13: 9780321502797
+Publisher: Addison-Wesley Professional
+URLs: http://safari.informit.com/9780321563835
+ http://www.opengles-book.com \ No newline at end of file
diff --git a/third_party/gles2_book/README.TXT b/third_party/gles2_book/README.TXT
new file mode 100644
index 0000000..aeeac05
--- /dev/null
+++ b/third_party/gles2_book/README.TXT
@@ -0,0 +1,54 @@
+Build Instructions
+------------------
+
+In order to run the code samples, you will need to download
+AMD's OpenGL ES 2.0 Emulator from:
+
+ http://developer.amd.com/gpu/opengl/Pages/default.aspx
+
+In order to build and run the samples, please copy the following
+files from C:\program files\AMD\OpenGL ES 2.0 Emulator v1.1\bin
+to the \Bin folder:
+
+ * libEGL.dll
+ * libGLESv2.dll
+
+Also, please copy the following files from
+C:\program files\AMD\OpenGL ES 2.0 Emulator v1.1\lib to
+the \Lib folder:
+
+ * libEGL.lib
+ * libGLESv2.lib
+
+For the OpenKODE sample in Chapter 15, place the following file from
+Acrodea's OpenKODE Implementation (http://www.acrodea.co.jp/en/openkode/)
+to the \Lib folder:
+
+ * libKD.lib
+
+
+RenderMonkey Workspaces
+-----------------------
+Finally, for the RenderMonkey workspaces (.rfx files), please download
+RenderMonkey v1.81 from AMD at:
+
+ http://developer.amd.com/gpu/rendermonkey/Pages/default.aspx
+
+
+Using the Imagination Technologies OpenGL ES 2.0 SDK
+----------------------------------------------------
+As an alternative to using the AMD OpenGL ES 2.0 Emulator, you can
+instead use the Imagination Technologies emulator from their
+OpenGL ES 2.0 SDK (http://www.imgtec.com/powervr/insider/powervr-sdk.asp).
+In this case, get the .LIB and .DLL files from:
+
+C:\Imagination Technologies\PowerVR SDK\OGLES2_WINDOWS_PCEMULATION_2.02.22.0756\Builds\OGLES2\WindowsPC\Lib
+
+and copy them to /Lib and /DLL respectively.
+
+Also, copy the header files from:
+
+C:\Imagination Technologies\PowerVR SDK\OGLES2_WINDOWS_PCEMULATION_2.02.22.0756\Builds\OGLES2\Include
+
+to Common/Include (overwriting the existing files).
+
diff --git a/third_party/gles2_book/README.chromium b/third_party/gles2_book/README.chromium
new file mode 100644
index 0000000..753e407
--- /dev/null
+++ b/third_party/gles2_book/README.chromium
@@ -0,0 +1,47 @@
+Name: OpenGL ES 2.0 Programming Guide
+Short Name: opengles-book
+URL: http://opengles-book.com/
+Version: unknown
+Security Critical: no
+License: MIT
+
+Description:
+Code samples from OpenGL ES 2.0 Programming Guide.
+Authors: Aaftab Munshi, Dan Ginsburg, Dave Shreiner
+Publisher: Addison-Wesley Professional
+ISBN: 0321502795
+
+Sample code is MIT licensed - http://www.opengles-book.com/downloads.html
+
+Local Modifications:
+ Removed files that chromium did not need:
+ - Bin/*
+ - Common/Doc/*
+ - Common/Include/EGL/*
+ - Common/Include/GLES2/*
+ - Common/Include/KD/*
+ - Common/Lib/*
+ - Common/Source/esUtil_win32.c
+ - Common/Source/Win32/esUtil_TGA.c
+ - Lib/*
+ - *.vcproj, *.sln
+
+ Added header files for individual examples so that they can be compiled as
+ static libraries:
+ - Chapter_2/Hello_Triangle/Hello_Triangle.h
+ - Chapter_8/Simple_VertexShader/Simple_VertexShader.h
+ - Chapter_9/MipMap2D/MipMap2D.h
+ - Chapter_9/Simple_Texture2D/Simple_Texture2D.h
+ - Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.h
+ - Chapter_9/TextureWrap/TextureWrap.h
+ - Chapter_11/Stencil_Test/Stencil_Test.h
+
+ Initialized local variables:
+ - Chapter_11/Stencil_Test/Stencil_Test.c
+ - Common/Source/esShader.c
+
+ Improvements in Chapter_11/Stencil_Test:
+ - Fixed depth and color values in Stencil Test
+ - Removed redundant glGetIntegerv in draw loop
+ - Restore stencil-mask state after every frame
+
diff --git a/third_party/gles2_book/gles2_book.gyp b/third_party/gles2_book/gles2_book.gyp
new file mode 100644
index 0000000..f44c58b
--- /dev/null
+++ b/third_party/gles2_book/gles2_book.gyp
@@ -0,0 +1,107 @@
+# Copyright (c) 2009 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'es_util',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../../gpu/gpu.gyp:gles2_c_lib_nocheck',
+ ],
+ 'include_dirs': [
+ 'Common/Include',
+ ],
+ 'all_dependent_settings': {
+ 'include_dirs': [
+ 'Common/Include',
+ ],
+ },
+ 'sources': [
+ 'Common/Include/esUtil.h',
+ 'Common/Source/esShader.c',
+ 'Common/Source/esShapes.c',
+ 'Common/Source/esTransform.c',
+ 'Common/Source/esUtil.c',
+ ],
+ },
+ {
+ 'target_name': 'hello_triangle',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'es_util',
+ ],
+ 'sources': [
+ 'Chapter_2/Hello_Triangle/Hello_Triangle.c',
+ 'Chapter_2/Hello_Triangle/Hello_Triangle.h',
+ ],
+ },
+ {
+ 'target_name': 'mip_map_2d',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'es_util',
+ ],
+ 'sources': [
+ 'Chapter_9/MipMap2D/MipMap2D.c',
+ 'Chapter_9/MipMap2D/MipMap2D.h',
+ ],
+ },
+ {
+ 'target_name': 'simple_texture_2d',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'es_util',
+ ],
+ 'sources': [
+ 'Chapter_9/Simple_Texture2D/Simple_Texture2D.c',
+ 'Chapter_9/Simple_Texture2D/Simple_Texture2D.h',
+ ],
+ },
+ {
+ 'target_name': 'simple_texture_cubemap',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'es_util',
+ ],
+ 'sources': [
+ 'Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.c',
+ 'Chapter_9/Simple_TextureCubemap/Simple_TextureCubemap.h',
+ ],
+ },
+ {
+ 'target_name': 'simple_vertex_shader',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'es_util',
+ ],
+ 'sources': [
+ 'Chapter_8/Simple_VertexShader/Simple_VertexShader.c',
+ 'Chapter_8/Simple_VertexShader/Simple_VertexShader.h',
+ ],
+ },
+ {
+ 'target_name': 'stencil_test',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'es_util',
+ ],
+ 'sources': [
+ 'Chapter_11/Stencil_Test/Stencil_Test.c',
+ 'Chapter_11/Stencil_Test/Stencil_Test.h',
+ ],
+ },
+ {
+ 'target_name': 'texture_wrap',
+ 'type': 'static_library',
+ 'dependencies': [
+ 'es_util',
+ ],
+ 'sources': [
+ 'Chapter_9/TextureWrap/TextureWrap.c',
+ 'Chapter_9/TextureWrap/TextureWrap.h',
+ ],
+ },
+ ]
+}