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

[BETA] ESM Grid #7079

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft

[BETA] ESM Grid #7079

wants to merge 22 commits into from

Conversation

kpal81xd
Copy link
Contributor

@kpal81xd kpal81xd commented Oct 30, 2024

Ports grid into a script from supersplat editor with changes:

  • Resolution resolution: Grid.RESOLUTION_HIGH | Grid.RESOLUTION_MEDIUM | Grid.RESOLUTION_LOW
  • Half extents halfExtents: Vec2
  • Grid can be recolored colorX: Color, colorZ: Color

Preview

image

@kpal81xd kpal81xd changed the title ESM Grid ESM Infinite Grid Oct 30, 2024
@kpal81xd kpal81xd self-assigned this Oct 30, 2024
@kpal81xd kpal81xd changed the title ESM Infinite Grid [BETA] ESM Infinite Grid Oct 30, 2024
@kpal81xd kpal81xd changed the title [BETA] ESM Infinite Grid [BETA] ESM Grid Oct 31, 2024
@marklundin
Copy link
Member

Just FYI, the grid breaksup over these objects

image

@kpal81xd
Copy link
Contributor Author

kpal81xd commented Nov 1, 2024

Just FYI, the grid breaksup over these objects

image

Yea so thats the dithering alpha @slimbuck we should prob add a flag for this what do you think?

@slimbuck
Copy link
Member

slimbuck commented Nov 1, 2024

Make sure the grid is the last opaque object rendered. Then only semitrans objects will expose the dithering.

@marklundin
Copy link
Member

The grid doesn't scale correctly when the screen aspect ratio changes

Screen.Recording.2024-11-01.at.15.11.30.mov

@marklundin
Copy link
Member

The grid doesn't scale correctly when the screen aspect ratio changes

Screen.Recording.2024-11-01.at.15.11.30.mov

This seems to be related to getFrustumCorners! And I've just seen the corresponding fix https://github.com/playcanvas/engine/pull/7077/files

@kpal81xd
Copy link
Contributor Author

kpal81xd commented Nov 1, 2024

The grid doesn't scale correctly when the screen aspect ratio changes
Screen.Recording.2024-11-01.at.15.11.30.mov

This seems to be related to getFrustumCorners! And I've just seen the corresponding fix https://github.com/playcanvas/engine/pull/7077/files

@slimbuck

scripts/grid.js Outdated Show resolved Hide resolved
scripts/grid.js Outdated Show resolved Hide resolved
scripts/grid.js Outdated Show resolved Hide resolved
scripts/grid.js Outdated Show resolved Hide resolved
@MAG-AdrianMeredith
Copy link
Contributor

The grid doesn't scale correctly when the screen aspect ratio changes

Screen.Recording.2024-11-01.at.15.11.30.mov

Is the grid being affected by postprocessing here?

@marklundin
Copy link
Member

Yep, it's got some post on it, but unrelated to the scaling issue which was to do with the frustum calculation

@MAG-AdrianMeredith
Copy link
Contributor

Yep, it's got some post on it, but unrelated to the scaling issue which was to do with the frustum calculation

But is it meant to?

@mvaligursky
Copy link
Contributor

But is it meant to?

Sure, whatever renders in the world gets post-processed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants