Jump to content

OSWS - The new MTA community water shader project

Recommended Posts

Today i proudly present to you: OSWS (OpenSourceWaterShader) for MTA: San Andreas!

What is this?

This resource is a project that i started long ago in order to finally (!) get a decent water shader working for MTA that benefits everybody. The main goal is to get an amazing shader where everyone should contribute to make it the very best looking water that we can get for this game engine. The code is pretty well optimized and the performance should be good for everyone, but a shader model 3.0 graphics card is REQUIRED for this resource!
The effect is applied to the water texture itself. It is NOT a post-processing water shader. This means that we do not have to deal with any issues that come with post-processing, for example smoke and any other effect that is rendering behind the drawn water. The downside of this method is the fact that we can not (as far as i know) add refraction to the stuff that is below the water surface. But maybe some genius knows a way to make it happen, or fix the rendering issues of post-processed water. Stuff like that is the main reason why i decided to make this resource a community project, improvements for everyone!


Water reflections, surface refraction:


Shore fading, shore foam:


Dynamic_sky support with sun + moon specular lighting:



Edited by Einheit-101
  • Like 13
  • Thanks 2
Link to post
Posted (edited)

KNOWN ISSUES (01.08.2020):

- Reflections are flawed, we get flickering and non-correct reflections in some situations (i have commented the shader very well, and some potential fixes are there, but i am no smart enough)
- Reflection edges are not stretched yet, we can see artifacts at the screen borders because of that. I dont know (yet) how to fix that aswell
- Refraction of stuff below the water surface seems to be impossible to add, but i am pretty sure that some genius can find a way
- Shore foam currently depends on camera view angle because i am not smart enough to calculate the vertical water depth at any given surface position

Edited by Einheit-101
Link to post

@Ren712 found a fix for the shore foam depending on view angle. But that fix introduces a new bug, because it does no longer account for water waves and the shore foam doesnt change its shape when waves are shaking the water up / down. The shader literally thinks that the water is completely planar, but it isnt.
We are currently working to fix this, if possible.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...