Skip to content

Conversation

@sunag
Copy link
Collaborator

@sunag sunag commented Feb 27, 2022

Description

Add FogNode in WebGPU.

Usage:

// 1.
scene.fogNode = new Nodes.FogRangeNode( color( 0xFF00FF ), float( 30 ), float( 300 )  );

// 2.
const factorNode = smoothstep( nearNode, farNode, negate( positionView.z ) );
scene.fogNode = new Nodes.FogNode( color( 0xFF00FF ), factorNode );

This contribution is funded by Google via Igalia.

@Mugen87 Mugen87 added this to the r139 milestone Mar 1, 2022
@mrdoob mrdoob merged commit 2813e8d into mrdoob:dev Mar 1, 2022
@mrdoob
Copy link
Owner

mrdoob commented Mar 1, 2022

Thanks!

donmccurdy pushed a commit to donmccurdy/three.js that referenced this pull request Mar 10, 2022
* ShaderNode: add functions -> mat3, mat4, uv, attribute, texture

* WebGPU: smoothstep support

* fix .getConst() of integers value

* WebGPU: FogNode

* webgpu_lights_selective: add scene.fogNode

* fix vector xy
@sunag sunag deleted the dev-webgpu-fog branch April 26, 2022 03:04
abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
* ShaderNode: add functions -> mat3, mat4, uv, attribute, texture

* WebGPU: smoothstep support

* fix .getConst() of integers value

* WebGPU: FogNode

* webgpu_lights_selective: add scene.fogNode

* fix vector xy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants