v4k-git-backup/engine/art/shaderlib/model_fs.glsl

44 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-08-24 17:32:25 +00:00
#ifndef MODEL_FS_GLSL
#define MODEL_FS_GLSL
2024-08-29 15:32:34 +00:00
uniform mat4 model, view, inv_view;
2024-08-24 13:24:44 +00:00
uniform sampler2D u_texture2d;
uniform vec3 u_coefficients_sh[9];
uniform bool u_textured; /// set:1
uniform bool u_lit; /// set:0
uniform bool u_matcaps; /// set:0
uniform vec4 u_diffuse; /// set:1,1,1,1
// lightmapping
uniform sampler2D u_lightmap;
uniform bool u_texlit;
uniform bool u_texmod; /// set:1
uniform float u_litboost; /// set:1
in vec3 v_position;
in vec3 v_position_ws;
#ifdef RIM
uniform mat4 M; // RIM
uniform vec3 u_rimcolor; /// set:0.05,0.05,0.05
uniform vec3 u_rimrange; /// set:0.11,0.98,0.5
uniform vec3 u_rimpivot; /// set:0,0,0
uniform bool u_rimambient; /// set:1
#endif
in vec3 v_normal, v_normal_ws;
in vec2 v_texcoord, v_texcoord2;
in vec4 v_color;
in vec3 v_tangent;
in vec3 v_binormal;
in vec3 v_to_camera;
in vec3 v_vertcolor;
2024-08-25 00:58:34 +00:00
in float v_depth;
2024-08-24 13:24:44 +00:00
out vec4 fragcolor;
2024-08-25 15:13:34 +00:00
uniform float u_global_alpha; /// set:1.0
2024-08-28 10:42:58 +00:00
uniform float u_global_opacity; /// set:1.0
2024-08-24 13:24:44 +00:00
uniform vec3 u_cam_pos;
uniform vec3 u_cam_dir;
2024-08-24 16:34:27 +00:00
uniform float frame_time;
uniform uint frame_count;
2024-08-24 17:32:25 +00:00
#endif