cOMS/shaders/liquids/water/sphere_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
319 B
HLSL
Executable File

varying vec3 position;
const vec3 underwaterColor = vec3(0.4, 0.9, 1.0);
uniform sampler2D water;
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;
}
}