2022-04-26 19:54:24 +02:00
|
|
|
#version 120
|
|
|
|
|
2023-02-25 11:03:39 -08:00
|
|
|
#include "lib/core/fragment.h.glsl"
|
2022-04-26 19:54:24 +02:00
|
|
|
|
|
|
|
uniform sampler2D reflectionMap;
|
|
|
|
|
2023-02-25 11:03:39 -08:00
|
|
|
vec4 sampleReflectionMap(vec2 uv)
|
2022-04-26 19:54:24 +02:00
|
|
|
{
|
|
|
|
return texture2D(reflectionMap, uv);
|
|
|
|
}
|
|
|
|
|
2024-04-04 21:12:47 +03:00
|
|
|
#if @waterRefraction
|
2022-04-26 19:54:24 +02:00
|
|
|
uniform sampler2D refractionMap;
|
|
|
|
uniform sampler2D refractionDepthMap;
|
|
|
|
|
2023-02-25 11:03:39 -08:00
|
|
|
vec4 sampleRefractionMap(vec2 uv)
|
2022-04-26 19:54:24 +02:00
|
|
|
{
|
|
|
|
return texture2D(refractionMap, uv);
|
|
|
|
}
|
|
|
|
|
2023-02-25 11:03:39 -08:00
|
|
|
float sampleRefractionDepthMap(vec2 uv)
|
2022-04-26 19:54:24 +02:00
|
|
|
{
|
|
|
|
return texture2D(refractionDepthMap, uv).x;
|
|
|
|
}
|
|
|
|
|
2022-05-13 18:58:00 -07:00
|
|
|
#endif
|
|
|
|
|
2023-02-25 11:03:39 -08:00
|
|
|
uniform sampler2D lastShader;
|
2022-05-13 18:58:00 -07:00
|
|
|
|
2023-02-25 11:03:39 -08:00
|
|
|
vec4 samplerLastShader(vec2 uv)
|
2022-05-13 18:58:00 -07:00
|
|
|
{
|
2023-02-25 11:03:39 -08:00
|
|
|
return texture2D(lastShader, uv);
|
2022-05-13 18:58:00 -07:00
|
|
|
}
|
2022-07-09 22:21:48 +02:00
|
|
|
|
|
|
|
#if @skyBlending
|
|
|
|
uniform sampler2D sky;
|
|
|
|
|
2023-02-25 11:03:39 -08:00
|
|
|
vec3 sampleSkyColor(vec2 uv)
|
2022-07-09 22:21:48 +02:00
|
|
|
{
|
|
|
|
return texture2D(sky, uv).xyz;
|
|
|
|
}
|
|
|
|
#endif
|