cOMS/shaders/liquids/water/cube_fragment.hlsl
Dennis Eichhorn 39fbcf4300
Some checks are pending
CodeQL / Analyze (${{ matrix.language }}) (autobuild, c-cpp) (push) Waiting to run
Microsoft C++ Code Analysis / Analyze (push) Waiting to run
linux bug fixes
2025-03-22 01:10:19 +00:00

13 lines
342 B
HLSL
Executable File

#include "helper.hlsli"
varying vec3 position;
uniform sampler2D water;
const vec3 underwaterColor = vec3(0.4, 0.9, 1.0);
void main() {
gl_FragColor = vec4(getSphereColor(position), 1.0);
vec4 info = texture2D(water, position.xz * 0.5 + 0.5);
if (position.y < info.r) {
gl_FragColor.rgb *= underwaterColor * 1.2;
}
}