updated DomeProjection example with simplified shader use

This commit is contained in:
codeanticode
2013-09-04 19:06:09 -04:00
parent 6cf649a0ce
commit a4c1cd25b5
4 changed files with 3 additions and 6 deletions
@@ -1,8 +1,6 @@
void initCubeMap() {
gridTex = loadImage("grid.png");
sphereDetail(50);
domeSphere = createShape(SPHERE, height/2.0f);
domeSphere.setTexture(gridTex);
domeSphere.rotateX(HALF_PI);
domeSphere.setStroke(false);
@@ -42,7 +40,7 @@ void initCubeMap() {
// Load cubemap shader.
cubemapShader = loadShader("cubemapfrag.glsl", "cubemapvert.glsl");
cubemapShader.set("EnvMap", 1);
cubemapShader.set("cubemap", 1);
}
void drawCubeMap() {
@@ -13,7 +13,6 @@ import java.nio.IntBuffer;
PShader cubemapShader;
PShape domeSphere;
PImage gridTex;
IntBuffer fbo;
IntBuffer rbo;
@@ -1 +1 @@
uniform sampler2D texture;
uniform samplerCube cubemap;
@@ -1 +1 @@
#define PROCESSING_TEXTURE_SHADER
uniform mat4 transform;