Working on web

This commit is contained in:
Vladislav Khorev committed 2025-12-07 16:46:43 +03:00
1 parent af00e77dc2
commit 38f4f6b7fc
12 files changed
+131 -152

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
uniform samplerCube Texture;
varying vec3 dir;
void main(){
gl_FragColor = textureCube(Texture, normalize(dir));
}
-21
View File
@@ -1,21 +0,0 @@
uniform samplerCube Env;
varying vec3 dir;
void main(){
gl_FragColor = textureCube(Env, normalize(dir));
vec4 fogColor = vec4(0.25, 0.55, 1.0, 1.0);
float coef = dir.y+1.0;
coef = clamp(coef, 0.0, 1.0);
gl_FragColor = mix(gl_FragColor,fogColor, coef);
//if (dir.z < 0)
//{
// gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
//}
//gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}
-14
View File
@@ -1,14 +0,0 @@
attribute vec3 vPosition;
uniform mat4 ProjectionMatrix;
uniform mat3 ModelRotateMatrix;
uniform vec3 ModelTranslateVector;
varying vec3 dir;
void main(){
vec4 realVertexPos = vec4(ModelRotateMatrix * vPosition.xyz + ModelTranslateVector, 1.0);
gl_Position = ProjectionMatrix * realVertexPos;
dir = -vPosition;
}
-21
View File
@@ -1,21 +0,0 @@
uniform samplerCube Env;
varying vec3 dir;
void main(){
gl_FragColor = textureCube(Env, normalize(dir));
vec4 fogColor = vec4(0.05, 0.05, 0.1, 1.0);
float coef = dir.y+1.0;
coef = clamp(coef, 0.0, 1.0);
gl_FragColor = mix(gl_FragColor,fogColor, coef);
//if (dir.z < 0)
//{
// gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
//}
//gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}
-14
View File
@@ -1,14 +0,0 @@
attribute vec3 vPosition;
uniform mat4 ProjectionMatrix;
uniform mat3 ModelRotateMatrix;
uniform vec3 ModelTranslateVector;
varying vec3 dir;
void main(){
vec4 realVertexPos = vec4(ModelRotateMatrix * vPosition.xyz + ModelTranslateVector, 1.0);
gl_Position = ProjectionMatrix * realVertexPos;
dir = -vPosition;
}
+7
View File
@@ -0,0 +1,7 @@
precision mediump float;
uniform samplerCube Texture;
varying vec3 dir;
void main(){
gl_FragColor = textureCube(Texture, normalize(dir));
}