to write a .PS file:
1- open the note pad:
2- write the following:
Quote: "#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D texture0;
uniform sampler2D texture1;
varying vec2 uv0Varying;
varying vec2 uv1Varying;
float red = .5;
float green = .5;
float blue = .5;
void main()
{
gl_FragColor = (texture2D(texture1, uv1Varying)+vec4(red,green,blue,1))*texture2D(texture0, uv0Varying);
}
"
3- save the file as .PS
so the values; red, green, blue can be modified to change the shader pixels colour and it varies between [0.0, 1.0]
now comeback to the 3d sample given by TGC. if you want to turn the room into a hazardous room, just set the red to 1, green to 0 and blue to 0.
for flashing room, put two .PS files with different colours values and create two shaders then set the object to change the shader.