diff options
| author | Ray <[email protected]> | 2017-10-23 22:05:27 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2017-10-23 22:05:27 +0200 |
| commit | 6a3005e0c8738912465bf9fc12f6f5b9caa3a73f (patch) | |
| tree | 0affe4dcf032f55b70131ac55e70055e7ce5c8a5 /examples/web/shaders/shaders_custom_uniform.data | |
| parent | b5a254452af9acaea801fafa50253f96893e246e (diff) | |
| download | raylib.com-6a3005e0c8738912465bf9fc12f6f5b9caa3a73f.tar.gz raylib.com-6a3005e0c8738912465bf9fc12f6f5b9caa3a73f.zip | |
Updated, corrected some issues
Diffstat (limited to 'examples/web/shaders/shaders_custom_uniform.data')
| -rw-r--r-- | examples/web/shaders/shaders_custom_uniform.data | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/web/shaders/shaders_custom_uniform.data b/examples/web/shaders/shaders_custom_uniform.data index 3aaa405..3655659 100644 --- a/examples/web/shaders/shaders_custom_uniform.data +++ b/examples/web/shaders/shaders_custom_uniform.data @@ -60396,7 +60396,7 @@ attribute vec3 vertexNormal; attribute vec4 vertexColor;
// Input uniform values
-uniform mat4 mvpMatrix;
+uniform mat4 mvp;
// Output vertex attributes (to fragment shader)
varying vec2 fragTexCoord;
@@ -60411,7 +60411,7 @@ void main() fragColor = vertexColor;
// Calculate final vertex position
- gl_Position = mvpMatrix*vec4(vertexPosition, 1.0);
+ gl_Position = mvp*vec4(vertexPosition, 1.0);
}#version 100
precision mediump float;
@@ -60427,16 +60427,16 @@ uniform vec4 colDiffuse; // NOTE: Add here your custom variables
// NOTE: Render size values should be passed from code
-const float renderWidth = 800;
-const float renderHeight = 450;
-
-float radius = 250.0;
-float angle = 0.8;
-
uniform vec2 center;
void main()
{
+ float renderWidth = 800.0;
+ float renderHeight = 450.0;
+
+ float radius = 250.0;
+ float angle = 0.8;
+
vec2 texSize = vec2(renderWidth, renderHeight);
vec2 tc = fragTexCoord*texSize;
tc -= center;
|
