Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGPU: FogNode #23606

Merged
merged 6 commits into from Mar 1, 2022
Merged

WebGPU: FogNode #23606

merged 6 commits into from Mar 1, 2022

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.

None yet

3 participants