-
Notifications
You must be signed in to change notification settings - Fork 77
Help
BKcore edited this page Feb 28, 2013
·
4 revisions
This is Shdr's Help page.
This update mode will recompile your shaders and update the viewer upon every keystroke in the editor. Choose auto update if you would like to see your changes immediately. If you are experiencing delays or lags in this mode, please use a less demanding update mode.
This mode will update the viewer everytime the key is used in the editor.
This mode will update the viewer everytime the key combination and is used in the editor.
uniform mat3 normalMatrix;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
uniform vec2 resolution;
uniform float time;
attribute vec3 position;
attribute vec3 normal;
precision highp float;
attribute vec3 position;
attribute vec3 normal;
uniform mat3 normalMatrix;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
varying vec3 fNormal;
varying vec3 fPosition;
void main()
{
fNormal = normalize(normalMatrix * normal);
vec4 pos = modelViewMatrix * vec4(position, 1.0);
fPosition = pos.xyz;
gl_Position = projectionMatrix * pos;
}
precision highp float;
uniform float time;
uniform vec2 resolution;
varying vec3 fPosition;
varying vec3 fNormal;
void main()
{
gl_FragColor = vec4(fNormal, 1.0);
}