Understanding watermask

Hello, I’m messing around with a toy project in order to learn CesiumJS.
I have two raster base layers (IonImageryProvider) that the user can switch between (by calling raiseToTop()).
They are clamped to terrain (Cesium.createWorldTerrain).
One of rasters has cells everywhere including the seas, and I would like to see this layer without a watermask. The other has cells which extend some kilometers into the sea, so it needs a watermask in order to look ok. Hence I’m requesting a watermask:

        const viewer = new Cesium.Viewer("cesiumContainer", {
          terrainProvider: Cesium.createWorldTerrain({
              requestVertexNormals: true 
              ,requestWaterMask: true

The watermask, in the API, belongs to the terrain, and the verb that’s used, is ‘request’, so I suppose this is about retrieving the data, rather than about the decision to display/show the watermask.
So I’m wondering, once the watermask data is retrieved as part of the terrain, is the visibility of it accessible somewhere in the API? I’ve been looking through the API and couldn’t find it…

Since there was no reply yet, I’ll explain some more what I’m asking about.
If I can only decide in the viewer construction, at the start, whether I want to ‘have’ the watermask or not, I would be keen on getting some control over the rendering of the watermask. In my globe, and the Sandcastle examples I’ve seen, the watermask is somewhat light blue from the distance, resolves to an animated wave shader when zooming in, and has some degree of transparency.
When I walk through the API trying to find something to get hold of, the watermask turns out to be a Uint8Array in a tile, which I’m guessing is used to denote the transparency, or alpha, ot the coast.
Or maybe my guess is wrong and it denotes something else, but the datatype is clearly not complex enough to control the rendering of the watermask.
So I’m looking for the place where I could make the watermask darker, ideally black, turn off the transparency or minimize it, and maybe also get rid of the waves.

Hi @stupor-mundi

If you’re curious, the globe’s fragment shader is what controls the appearance of the ocean. I know it’s affected by the scene lighting, but beyond that, I don’t think the public API currently exposes enough properties to allow you to properly tweak the appearance. Feel free to open an issue on GitHub for this, describing what parameters you’d want exposed to the public API.

That being said, you can use the Globe.showWaterEffect property to turn off the wave animation.

Hi @sanjeetsuhag,
thanks for your tips!
I’m not sure I should open an issue for this, since I’m so new to Cesium and it might be that the way I’m trying to use this is very atypical and just due to my unfamiliarity with the structure of Cesium.
I also tried to use Globe.showWaterEffect=false but the effect was different from my expectation.
Instead of just the wave effect disappearing, the entire watermask (visually) disappeared. The globe looks exactly as if I had not specified (loaded) a watermask.
I first assumed I had created a Javascript error and checked the console, but nothing there. So I suppose this is either what’s meant to happen, or possibly a bug?