📄 Fog.js
¶
📊 Analysis Summary¶
Metric | Count |
---|---|
🔧 Functions | 3 |
📦 Imports | 5 |
📊 Variables & Constants | 2 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 src/nodes/fog/Fog.js
📦 Imports¶
Name | Source |
---|---|
positionView |
../accessors/Position.js |
smoothstep |
../math/MathNode.js |
Fn |
../tsl/TSLBase.js |
output |
../tsl/TSLBase.js |
vec4 |
../tsl/TSLBase.js |
Variables & Constants¶
Name | Type | Kind | Value | Exported |
---|---|---|---|---|
viewZ |
any |
let/var | *not shown* |
✗ |
getViewZ |
any |
let/var | builder.context.getViewZ |
✗ |
Functions¶
getViewZNode(builder: NodeBuilder): Node
¶
JSDoc:
/**
* Returns a node that represents the `z` coordinate in view space
* for the current fragment. It's a different representation of the
* default depth value.
*
* This value can be part of a computation that defines how the fog
* density increases when moving away from the camera.
*
* @param {NodeBuilder} builder - The current node builder.
* @return {Node} The viewZ node.
*/
Parameters:
builder
NodeBuilder
Returns: Node
Calls:
getViewZ
( viewZ || positionView.z ).negate
Code
rangeFog(color: Node, near: Node, far: Node): Function
¶
JSDoc:
/**
* @tsl
* @function
* @deprecated since r171. Use `fog( color, rangeFogFactor( near, far ) )` instead.
*
* @param {Node} color
* @param {Node} near
* @param {Node} far
* @returns {Function}
*/
Parameters:
color
Node
near
Node
far
Node
Returns: Function
Calls:
console.warn
fog
rangeFogFactor
Code
densityFog(color: Node, density: Node): Function
¶
JSDoc:
/**
* @tsl
* @function
* @deprecated since r171. Use `fog( color, densityFogFactor( density ) )` instead.
*
* @param {Node} color
* @param {Node} density
* @returns {Function}
*/
Parameters:
color
Node
density
Node
Returns: Function
Calls:
console.warn
fog
densityFogFactor