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

New GPU lightmapper #38386

Merged
merged 1 commit into from
May 11, 2020
Merged

New GPU lightmapper #38386

merged 1 commit into from
May 11, 2020

Conversation

reduz
Copy link
Member

@reduz reduz commented May 1, 2020

Working on a new GPU based lightmapper (and pluggable lightmapper API), lightmapping part is almost done, missing lightprobe part.
image
image
image

-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place

@reduz reduz requested review from akien-mga and vnen as code owners May 1, 2020 12:56
@Calinou Calinou added this to the 4.0 milestone May 1, 2020
@Calinou Calinou marked this pull request as draft May 1, 2020 12:58
@Zylann
Copy link
Contributor

Zylann commented May 1, 2020

Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)

Like... atlas packing? :p Godot had that at some point I believe

@reduz reduz force-pushed the new-lightmapper branch from 57fd955 to a2c090e Compare May 9, 2020 18:21
@reduz reduz marked this pull request as ready for review May 9, 2020 18:23
@reduz
Copy link
Member Author

reduz commented May 9, 2020

It's finally ready for review!

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

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

Well, This is incredibly complex. I didn't understand most of it. Just left a few notes about formatting and some left behind comments

editor/import/editor_scene_importer_gltf.cpp Outdated Show resolved Hide resolved
editor/plugins/texture_layered_editor_plugin.cpp Outdated Show resolved Hide resolved
modules/lightmapper_rd/lm_blendseams.glsl Show resolved Hide resolved
scene/3d/baked_lightmap.h Outdated Show resolved Hide resolved
servers/rendering_server.cpp Show resolved Hide resolved
@clayjohn
Copy link
Member

The appveyor failure can be fixed by replacing -0x8000000 with -2147483647 - 1 or INT_MIN.

On my system, the build is still failing later due to the size of the generated string in lm_compute.glsl.gen.h exceeding MSVC's limit of 2,048 bytes

@reduz reduz force-pushed the new-lightmapper branch 6 times, most recently from 9db4536 to fe33bb8 Compare May 10, 2020 18:50
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
@reduz reduz force-pushed the new-lightmapper branch from fe33bb8 to 1bea8e1 Compare May 10, 2020 18:59
@reduz reduz changed the title [WIP] New GPU lightmapper New GPU lightmapper May 11, 2020
@akien-mga akien-mga merged commit 32133a1 into godotengine:master May 11, 2020
@akien-mga
Copy link
Member

Thanks!

akien-mga added a commit to akien-mga/godot that referenced this pull request May 11, 2020
…copyright

Also renamed `delaunay.h` to `delaunay_2d.h` to match the class name.
@Anutrix
Copy link
Contributor

Anutrix commented May 11, 2020

Following error after this commit:

[ 93%] �[94mCompiling �[95m==> �[93mcore\math\r128.cpp�[0m
=====
b'In file included from core\\math\\r128.cpp:2:\r\n.\\thirdparty/r128/r128.h:801:9: error: unknown pragma ignored [-Werror,-Wunknown-pragmas]\r\n#pragma code_seg(".text")\r\n        ^\r\n.\\thirdparty/r128/r128.h:802:12: error: unknown attribute \'allocate\' ignored [-Werror,-Wunknown-attributes]\r\n__declspec(allocate(".text")) static const unsigned char r128__udiv128Code[] = {\r\n           ^\r\n2 errors generated.\r\n'
=====

#38663 might fix this.
Update: Fixed by 38663.

akien-mga added a commit that referenced this pull request May 11, 2020
thirdparty: Cleanup after #38386, document provenance and copyright
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