2024-10-11 16:38:21 +00:00
|
|
|
#version 460 core
|
|
|
|
|
2024-10-11 23:02:12 +00:00
|
|
|
uniform sampler2D s_albedo;
|
|
|
|
uniform sampler2D s_normal;
|
|
|
|
uniform sampler2D s_specular;
|
|
|
|
uniform sampler2D s_roughness;
|
|
|
|
uniform sampler2D s_metalic;
|
2024-10-11 16:38:21 +00:00
|
|
|
|
2024-10-11 23:02:12 +00:00
|
|
|
in vec3 pos;
|
|
|
|
in vec3 norm;
|
|
|
|
in vec2 tex;
|
2024-10-11 16:38:21 +00:00
|
|
|
|
2024-10-11 23:02:12 +00:00
|
|
|
out vec4 FragColor;
|
|
|
|
out vec3 position;
|
|
|
|
out vec3 albedo;
|
|
|
|
out vec3 normal;
|
|
|
|
out vec3 material;
|
2024-10-11 16:38:21 +00:00
|
|
|
|
|
|
|
void main() {
|
2024-10-11 23:02:12 +00:00
|
|
|
position = pos;
|
|
|
|
albedo = texture(s_albedo, tex).rgb;
|
|
|
|
normal = texture(s_normal, tex).rgb;
|
|
|
|
material.x = texture(s_specular, tex).x;
|
|
|
|
material.y = texture(s_roughness, tex).y;
|
|
|
|
material.z = texture(s_metalic, tex).z;
|
|
|
|
|
|
|
|
FragColor = texture(s_albedo, tex);
|
|
|
|
}
|