1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 02:15:34 +00:00

Use Allman brackets

This commit is contained in:
Andrei Kortunov 2023-04-02 13:31:06 +04:00
parent e17281ac67
commit 295f528f08
2 changed files with 4 additions and 2 deletions

View file

@ -17,7 +17,8 @@ void main()
vec4 color = texture2D(imageIn, uv);
float wavesizeMultiplier = getTemporalWaveSizeMultiplier(osg_SimulationTime);
for (int i = 0; i < positionCount; ++i) {
for (int i = 0; i < positionCount; ++i)
{
float wavesize = wavesizeMultiplier * positions[i].z;
float displace = clamp(2.0 * abs(length((positions[i].xy + offset) - gl_FragCoord.xy) / wavesize - 1.0), 0.0, 1.0);
color.rg = mix(vec2(-1.0), color.rg, displace);

View file

@ -20,7 +20,8 @@ void main()
vec4 color = imageLoad(imageIn, texel);
float wavesizeMultiplier = getTemporalWaveSizeMultiplier(osg_SimulationTime);
for (int i = 0; i < positionCount; ++i) {
for (int i = 0; i < positionCount; ++i)
{
float wavesize = wavesizeMultiplier * positions[i].z;
float displace = clamp(2.0 * abs(length((positions[i].xy + offset) - vec2(gl_GlobalInvocationID.xy)) / wavesize - 1.0), 0.0, 1.0);
color.rg = mix(vec2(-1.0), color.rg, displace);