View Issue Details

IDProjectCategoryView StatusLast Update
0004306The Dark ModGraphicspublic17.12.2020 02:35
ReporterSteveL Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status feedbackResolutionopen 
Product VersionTDM 2.04 
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.

Relationships

child of 0003684 new Investigate GPL Renderer Improvements 

Activities

nbohr1more

nbohr1more

22.11.2016 20:29

developer   ~0008538

Related:

http://forums.thedarkmod.com/topic/18036-messing-with-sea-water/
nbohr1more

nbohr1more

20.09.2017 23:33

developer   ~0009319

Last edited: 20.09.2017 23:34

2.06

heatHazeWithAlphaDepth.vfp was committed at rev 14875

tdm_experimental_semiopaque.mtr was commited at rev 14938

Future work possible in 2.07

nbohr1more

nbohr1more

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
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
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
17.12.2020 02:35 nbohr1more Target Version TDM 2.09 =>