29 lines
580 B
GLSL
29 lines
580 B
GLSL
#version 460 core
|
|
|
|
uniform sampler2D s_albedo;
|
|
uniform sampler2D s_normal;
|
|
uniform sampler2D s_specular;
|
|
uniform sampler2D s_roughness;
|
|
uniform sampler2D s_metalic;
|
|
|
|
in vec3 pos;
|
|
in vec3 norm;
|
|
in vec2 tex;
|
|
|
|
out vec4 FragColor;
|
|
out vec3 position;
|
|
out vec3 albedo;
|
|
out vec3 normal;
|
|
out vec3 material;
|
|
|
|
void main() {
|
|
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);
|
|
}
|