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

Breaking: smarter geometry attributes #10118

Merged
merged 7 commits into from
Jan 16, 2024
Merged

Conversation

GoodBoyDigital
Copy link
Member

  • auto detect geometry attribute data for WebGPU
  • refined and aligned how we do this in WebGL too
  • renamed shaderLocation to location on attribute
  • added some tests
// before:
 const geometry = new Geometry({
        attributes: {
            aPosition: {
                buffer:[-100, -50, 100, -50, 0, 100],
                shaderLocation:0,
                format: 'float32x2',
            },
            aColor: {
                buffer:[1, 0, 0, 0, 1, 0, 0, 0, 1],
                shaderLocation:1,
                format: 'float32x3',
            }
        },
    })

// after:
 const geometry = new Geometry({
        attributes: {
            aPosition:[-100, -50, 100, -50, 0, 100],
            aColor: [1, 0, 0, 0, 1, 0, 0, 0, 1],
        },
    })

- refined and aligned how we do this in WebGL too
- renamed `shaderLocation` to `location` on attribute
- added tests
Copy link

codesandbox-ci bot commented Jan 15, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 42a95a5:

Sandbox Source
pixi.js-sandbox Configuration

@Zyie Zyie changed the title v8 chore/geometry smarter attributes Feat: smarter geometry attributes Jan 15, 2024
@Zyie Zyie changed the title Feat: smarter geometry attributes Breaking: smarter geometry attributes Jan 15, 2024
@Zyie Zyie merged commit d1ff839 into next-v8 Jan 16, 2024
4 checks passed
@Zyie Zyie deleted the chore/geometry-smarter-attributes branch January 16, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants