opengl-deferred/assets/shader/screen/screen.fs

20 lines
394 B
Forth
Raw Normal View History

2024-10-12 02:03:59 +00:00
#version 460 core
uniform sampler2D albedo;
uniform sampler2D depth;
uniform sampler2D normal;
uniform sampler2D material;
uniform sampler2D position;
in vec3 pos;
in vec2 tex;
out vec4 FragColor;
float map(float value, float min1, float max1, float min2, float max2) {
return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
}
void main() {
FragColor = texture(position, tex);
}