Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
nils.ro
nils.ro's Profile
1
Posts
0
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
3d pointLight or spotLight for flat texture.
[0 Replies]
20-Aug-2012 02:42 AM
Forum:
Core Library Questions
Helo,
Im Cant understand why this does not work. I try to get a light on a flat image. Just as a light-blob. But for some reasen the middel dont light up. Does anybody know how the fix this?
Thanks in advances.
where is my code:
import processing.opengl.*;
PImage a;
void setup() {
size(1920, 1080, OPENGL);
a = loadImage("Big.jpg");
}
void draw() {
pushMatrix();
translate(mouseX, mouseY);
pointLight(255, 255, 255, 0, 0, 50);
popMatrix();
background(0);
noStroke();
int z = 0;
beginShape();
texture(a);
vertex(0, 0, z, 0, 0);
vertex(width, 0, z, width, 0);
vertex(width, height, z, width, height);
vertex(0, height, z, 0, height);
endShape();
}
«Prev
Next »
Moderate user : nils.ro
Forum