mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
updated DomeProjection example with simplified shader use
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user