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

Case 22494, BUGZ-127: Render lightmaps in the forward renderer #15522

Merged
merged 1 commit into from May 13, 2019

Conversation

@SaracenOne
Copy link
Contributor

commented May 8, 2019

https://highfidelity.atlassian.net/browse/BUGZ-127
https://highfidelity.manuscript.com/f/cases/22494/Forward-renderer-is-missing-lightmap-pipelines

Work for experimental lightmap support being added to the forward renderer. To test, run the engine with the environment variable HIFI_RENDER_FORWARD set to 1, and simply place a lightmapped object in the world. In my case, I run the interface, log in, acquire the Desert Oasis from the marketplace and then load it via the inventory.

While this implementation works functionally correctly, the lightmapped objects currently do NOT interact with directional light, which is how the deferred renderer works; lightmaps are primarily treated as a replacement for indirect lighting only since the deferred renderer is able to handle vast numbers of direct lights without a problem. This implementation is currently concerned with simply allowing people to make aesthetically-pleasing content for something like the upcoming Quest, but hopefully more features can be added.

@SamGondelman SamGondelman self-assigned this May 8, 2019

@SaracenOne SaracenOne changed the title DNM: Render lightmaps in the forward renderer Render lightmaps in the forward renderer May 8, 2019

@hifi-gustavo

This comment has been minimized.

@hifi-gustavo

This comment has been minimized.

@hifi-gustavo

This comment has been minimized.

@hifi-gustavo

This comment has been minimized.

@hifi-gustavo

This comment has been minimized.

Copy link
Contributor

commented May 8, 2019

Android build is available here. Quest build is available here

@SamGondelman SamGondelman changed the title Render lightmaps in the forward renderer Case 22494: Render lightmaps in the forward renderer May 8, 2019

@SamGondelman SamGondelman changed the title Case 22494: Render lightmaps in the forward renderer Case 22494, BUGZ-127: Render lightmaps in the forward renderer May 8, 2019

addPipeline(Key::Builder().withMaterial().withUnlit(), program::forward_model_unlit);
addPipeline(Key::Builder().withMaterial().withTangents(), program::forward_model_normal_map);

addPipeline(Key::Builder().withMaterial().withTangents().withLightmap(), program::forward_model_normal_map_lightmap);

// Deformed Opaques

This comment has been minimized.

Copy link
@SamGondelman

SamGondelman May 10, 2019

Contributor

Hm...do we need pipelines for deformed opaques too? It looks like they're missing from initDeferredPipelines too...

Also, initDeferredPipelines initializes a pipeline for Key::Builder().withMaterial().withTranslucent().withLightmap(), but re-uses model_translucent. We should probably do that for forward also and leave the same FIXME.

This comment has been minimized.

Copy link
@samcake

samcake May 10, 2019

Contributor

i don;t think deferred and light map is a big deal ?

@shanzzam shanzzam added this to the v0.83.0 milestone May 13, 2019

not blocking

@shanzzam shanzzam merged commit 5c58cec into highfidelity:master May 13, 2019

2 checks passed

default Build finished.
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.