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

[gui] GGUI scene APIs are broken #5658

Merged
merged 7 commits into from
Aug 7, 2022
Merged

[gui] GGUI scene APIs are broken #5658

merged 7 commits into from
Aug 7, 2022

Conversation

PENGUINLIONG
Copy link
Member

@PENGUINLIONG PENGUINLIONG commented Aug 7, 2022

The ambient_light example is broken:

scene = ti.ui.Scene()
scene.ambient_light([0.2, 0.2, 0.2])

which gives:

ambient_light(): incompatible function arguments. The following argument types are supported:
    1. (self: taichi._lib.core.taichi_python.PyScene, arg0: tuple) -> None

Invoked with: <taichi._lib.core.taichi_python.PyScene object at 0x7f7c810ad7b0>, [0.2, 0.2, 0.2]

point_light has a similar issue.

Also note that if a scene doesn't have any lighting except for the ambient light, no lighting SSBO will be allocated and Canvas.scene will crash attempting to map this SSBO. Tried not to map when point_lights.size() == 0 but it doesn't work. So workaround atm.

@netlify
Copy link

netlify bot commented Aug 7, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit ade152b
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/62ef36f2995e720008e3aa72
😎 Deploy Preview https://deploy-preview-5658--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@PENGUINLIONG
Copy link
Member Author

BTW when there is no point light, scene rendering doesn't work.

@PENGUINLIONG PENGUINLIONG changed the title [gui] GGUI scene ambient_light is broken [gui] GGUI scene APIs are broken Aug 7, 2022
@k-ye
Copy link
Member

k-ye commented Aug 7, 2022

Should this be cherrypicked into V1.1? (cc @ailzhang @feisuzhu )

Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

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

Thanks! @PENGUINLIONG would you mind sending another PR against rc-v1.1.0 branch as well?

@ailzhang ailzhang merged commit 907ac96 into master Aug 7, 2022
@ailzhang ailzhang added this to the Taichi v1.1.0 milestone Aug 8, 2022
@PENGUINLIONG PENGUINLIONG deleted the PENGUINLIONG-patch-1 branch August 8, 2022 02:56
@PENGUINLIONG PENGUINLIONG restored the PENGUINLIONG-patch-1 branch August 8, 2022 02:56
PENGUINLIONG added a commit to PENGUINLIONG/taichi that referenced this pull request Aug 8, 2022
* GGUI scene ambient_light is broken

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed point light

* Ensure the allocation of light source SSBO

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update canvas.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
ailzhang pushed a commit that referenced this pull request Aug 8, 2022
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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