Skip to content

Commit 06e6d8c

Browse files
committed
Upgraded shader
1 parent 3462724 commit 06e6d8c

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

model/skybox/example/skybox.fp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
varying mediump vec3 var_texcoord0;
1+
#version 140
2+
3+
in mediump vec3 var_texcoord0;
24

35
uniform samplerCube cubemap;
46

5-
void main() {
6-
gl_FragColor = textureCube(cubemap, var_texcoord0);
7+
void main()
8+
{
9+
gl_FragColor = texture(cubemap, var_texcoord0);
710
}

model/skybox/example/skybox.vp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
uniform mediump mat4 view_proj;
2-
uniform mediump mat4 world;
1+
#version 140
32

4-
attribute mediump vec3 position;
3+
uniform vs_uniforms
4+
{
5+
uniform mediump mat4 view_proj;
6+
uniform mediump mat4 world;
7+
};
8+
9+
in highp vec3 position;
510

6-
varying mediump vec3 var_texcoord0;
11+
out mediump vec3 var_texcoord0;
712

813
void main()
914
{

0 commit comments

Comments
 (0)