ho3/resources/shaders/env_reverse.fragment

21 lines
387 B
Plaintext
Raw Permalink Normal View History

2024-06-08 22:09:17 +00:00
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);
}