26 lines
632 B
GLSL
26 lines
632 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;
|
|
|
|
layout (location = 0) out vec3 albedo;
|
|
layout (location = 1) out vec3 normal;
|
|
layout (location = 2) out vec3 material;
|
|
layout (location = 3) out vec3 position;
|
|
|
|
void main() {
|
|
position = pos;
|
|
albedo = texture(s_albedo, tex).rgb;
|
|
normal = normalize(texture(s_normal, tex).rgb * 2.0 - 1.0);
|
|
material.x = texture(s_specular, tex).x;
|
|
material.y = texture(s_roughness, tex).y;
|
|
material.z = texture(s_metalic, tex).z;
|
|
}
|