mergePBRmat_optimized.frag 457 B

123456789101112131415161718
  1. #version 430 core
  2. noperspective in vec2 v_texCoords;
  3. out vec4 fragColor;
  4. layout(binding = 0) uniform sampler2D u_roughness;
  5. layout(binding = 1) uniform sampler2D u_metallic;
  6. layout(binding = 2) uniform sampler2D u_ambient;
  7. void main()
  8. {
  9. float metallic = texture(u_metallic, v_texCoords).r;
  10. float roughness = texture(u_roughness, v_texCoords).r;
  11. float ambient = texture(u_ambient, v_texCoords).r;
  12. fragColor = vec4(roughness, metallic, ambient, 1);
  13. }