Hi I'm trying to have a flashing screen where the color changes between two colors in WebGL. I have the code setup for a square with one color but couldn't figure how to make it switch between two colors at a speed not conceivable by the human eye, say 1KHz. Thanks in advance, I'm new to this.
Asked
Active
Viewed 334 times
-1
-
4And where is the code you're using? – Neil Jun 25 '12 at 15:13
-
The screen refresh rate of a standard computer monitor is at around 100 Hz. Unless you have specialized equipment you can't get to 1KHz. – JJJ Jun 25 '12 at 15:14
-
Welcome to SO. To help us in help you, always provide the relavant parts of the code and http://whathaveyoutried.com . – Ricardo Souza Jun 25 '12 at 15:15
-
If the flashing is so fast it's not detectable by the human eye, why do it? – Steve Wellens Jun 25 '12 at 15:17
-
@SteveWellens: possibly to implement some form of dithering? – David Thomas Jun 25 '12 at 15:20
-
Oh, incidentally: please don't; all I can really say is that the [effect is nauseous](http://jsfiddle.net/davidThomas/JzYkW/1/). (And if you're potentially a photosensitive epileptic **please do not** visit that link.) – David Thomas Jun 25 '12 at 15:25
-
The code im using so far is the code from: learningwebgl.com/lessons/lesson02/index.html I'm using the code for the square. I know pople have implemented it using Native, isn't it possible using WebGL? @SteveWellens: There are communication applications for the same. Check out News Flash by MIT for a demo – Karan Bhandarkar Jun 25 '12 at 15:37
-
@DavidThomas: That is sort of what I'm looking for but could it go any faster so that to the human eye it looks like one constant color – Karan Bhandarkar Jun 25 '12 at 15:39
-
No; it's down to the refresh rate of the monitor, and its ability to update the display as quickly as JavaScript processes the code. The native ability of a monitor to dither is activated by the requested colour (and it's not being available except with dithering). – David Thomas Jun 25 '12 at 15:41
-
Thanks. The best way to achieve it is keep the blocks fized and flash it using java script. Just found out, so thought i'd share – Karan Bhandarkar Jun 25 '12 at 21:26