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-12 02:03:59 +00:00
|
|
|
layout (location = 0) out vec3 albedo;
|
|
|
|
layout (location = 1) out vec3 normal;
|
|
|
|
layout (location = 2) out vec3 material;
|
|
|
|
layout (location = 3) out vec3 position;
|
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;
|
|
|
|
}
|
2024-10-12 02:03:59 +00:00
|
|
|
|