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

NME: multiple changes to support ray marching in the NME #13272

Merged
merged 16 commits into from
Nov 22, 2022
Merged

NME: multiple changes to support ray marching in the NME #13272

merged 16 commits into from
Nov 22, 2022

Conversation

Popov72
Copy link
Contributor

@Popov72 Popov72 commented Nov 21, 2022

The main changes are that some blocks can be configured to generate their code in the fragments shader only (Lights, PBRMetallicRoughness, Reflection).

New blocks have also been added: FragDepthBlock to write fragment depth, ShadowMapBlock to generate depth in a shadow map.

The ShadowDepthWrapper has also been updated to work with materials using a ShadowMapBlock.

A couple of helper blocks have also been created: TriPlanarBlock and BiPlanarBlock for sampling a texture with a tri/bi planar mapping (ray marching does not usually produce uvs, so we need to be able to sample a texture with a position+normal instead).

Note that we haven't created a ray marching node itself, but it's now possible for users to create one. In the PG demo below, we have implemented a very basic one with a CustomBlock.

Here is a PG that uses all these new features:

https://playground.babylonjs.com/#M3QR7E#34

image

@azure-pipelines
Copy link

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@Popov72 Popov72 added new feature nme Node Material Editor labels Nov 21, 2022
@azure-pipelines
Copy link

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@azure-pipelines
Copy link

Copy link
Member

@sebavan sebavan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me only minor comments and mostly the same 3 in various places :-)

@sebavan sebavan merged commit c288016 into BabylonJS:master Nov 22, 2022
RaananW pushed a commit that referenced this pull request Dec 9, 2022
NME: multiple changes to support ray marching in the NME
Former-commit-id: 5cf123d8b5c26173a3fec0c2865506018f0cb5d7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature nme Node Material Editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants