View Issue Details

IDProjectCategoryView StatusLast Update
0004306The Dark ModGraphicspublic13.05.2020 04:40
ReporterSteveL Assigned To 
Status feedbackResolutionopen 
Product VersionTDM 2.04 
Target VersionTDM 2.09 
Summary0004306: Semi-opaque water
DescriptionWater should not have a hard edge. Most natural water (rivers, sea, sewer) holds small opaque sediment particles and should be opaque after a certain depth, depending on the density of the sediment. Very shallow water should be less noticeable, i.e. you can see through it better.

Create a generic depth_difference shader which paints a grayscale image based on the depth difference between a transparent surface (i.e. water) and the solid background.

This will allow us to represent semi-opaque materials where the opacity depends on the thickness of the material. Sea and river water are obvious examples. We can use the shader with a maskColor command to paint into the alpha layer, then draw the coloured water surface with BLEND BLEND so that the mix of foreground and background texture depends on "how much" of the material is in front of the background.

The opacity should be a shaderparm which determines at what thickness the material becomes opaque, same way that fog distance works.
TagsNo tags attached.


child of 0003684 new Investigate GPL Renderer Improvements 




22.11.2016 20:29

developer   ~0008538



20.09.2017 23:33

developer   ~0009319

Last edited: 20.09.2017 23:34

View 2 revisions


heatHazeWithAlphaDepth.vfp was committed at rev 14875 was commited at rev 14938

Future work possible in 2.07



13.05.2020 04:40

developer   ~0012500

ARB shaders were converted to GLSL during 2.08

Moving to 2.09 for any further work.

Issue History

Date Modified Username Field Change
23.04.2016 21:15 SteveL New Issue
23.04.2016 21:15 SteveL Status new => assigned
23.04.2016 21:15 SteveL Assigned To => SteveL
23.04.2016 21:16 SteveL Description Updated View Revisions
22.11.2016 20:29 nbohr1more Note Added: 0008538
25.11.2016 13:56 grayman Target Version TDM 2.05 => TDM 2.06
01.12.2016 21:12 nbohr1more Relationship added child of 0003684
15.02.2017 04:32 grayman Assigned To SteveL =>
15.02.2017 04:32 grayman Status assigned => new
20.09.2017 23:33 nbohr1more Note Added: 0009319
20.09.2017 23:34 nbohr1more Note Edited: 0009319 View Revisions
20.09.2017 23:34 nbohr1more Target Version TDM 2.06 => TDM 2.07
20.09.2017 23:34 nbohr1more Status new => feedback
05.07.2018 17:27 nbohr1more Target Version TDM 2.07 => TDM 2.08
13.05.2020 04:40 nbohr1more Note Added: 0012500
13.05.2020 04:40 nbohr1more Target Version TDM 2.08 => TDM 2.09