Water lod control: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (new category)
No edit summary
Line 3: Line 3:
{{map_properties}}
{{map_properties}}
{{clr}}
{{clr}}
== Caveats ==
{{bug|The water_lod_controller was disabled late in development. Any water with reflections enabled are always rendered expensively or with bForceExpensive always set to true.}}
To re-enable you will need to modify code in <code>CViewRender::DetermineWaterRenderInfo(...)</code> on line 2228, replace it with:
<source lang=cpp>if( !r_WaterDrawReflection.GetBool() )</source>
Also replace line 2256 with:
<source lang=cpp>if ( (fogVolumeInfo.m_flDistanceToWater >= m_flCheapWaterEndDistance) || bForceCheap )</source>
I also changed line 2212 with brute force code. All my materials were returning bForceExpensive true regardless of settings:
<source lang=cpp>bForceExpensive = false;</source>


== Keyvalues ==
== Keyvalues ==

Revision as of 23:34, 10 May 2013

Template:Base point It is used to control the LOD behavior of any water in the map. If your map has water, this entity is required.

Template:Map properties

Caveats

Icon-Bug.pngBug:The water_lod_controller was disabled late in development. Any water with reflections enabled are always rendered expensively or with bForceExpensive always set to true.  [todo tested in ?]

To re-enable you will need to modify code in CViewRender::DetermineWaterRenderInfo(...) on line 2228, replace it with:

if( !r_WaterDrawReflection.GetBool() )

Also replace line 2256 with:

if ( (fogVolumeInfo.m_flDistanceToWater >= m_flCheapWaterEndDistance) || bForceCheap )

I also changed line 2212 with brute force code. All my materials were returning bForceExpensive true regardless of settings:

bForceExpensive = false;

Keyvalues

Start Transition to Cheap Water ([todo internal name (i)]) <float>
This is the distance from the camera that water will start transitioning to cheap water, in inches.
End Transition to Cheap Water ([todo internal name (i)]) <float>
This is the distance from the camera that water will finish transitioning to cheap water, in inches.
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Inputs

SetCheapWaterStartDistance <floatRedirectInput/float>
Set the distance that water starts transitioning to cheap water.
SetCheapWaterEndDistance <floatRedirectInput/float>
Set the distance that water finishes transitioning to cheap water.


Outputs

See also