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

Lighting/Pass compatibility #855

Open
plredmond opened this Issue Aug 7, 2018 · 9 comments

Comments

Projects
None yet
@plredmond
Copy link

plredmond commented Aug 7, 2018

I've noticed some holes in the supported lights with different rendering passes. I'll catalog them here, so that maybe I or somebody can work on fixing them eventually. I'll post my test program when I get a chance.

Pass Area Directional Point Spot Sun
DrawShaded<PosNormTex> Lit Lit Dark
DrawShadedSeparate<PosNormTex>
DrawPbm<PosNormTangTex> Dark Lit Dark
DrawPbmSeparate<PosNormTangTex> Bugged Dark
DrawFlat<PosTex> n/a n/a n/a n/a n/a
DrawFlatSeparate<PosTex> n/a n/a n/a n/a n/a

Pinging @omni-viral per @jojolepro for guidance.

@omni-viral

This comment has been minimized.

Copy link
Member

omni-viral commented Aug 7, 2018

In Pbm shaders passes Directional light wasn't implemented. Should be.
What's Sun light type? How it is different from Directional

@minecrawler

This comment has been minimized.

Copy link
Contributor

minecrawler commented Aug 7, 2018

As per the comment above the struct:

/// A realistic disk-shaped sun light source.

So I guess that a directional light has parallel light rays, but a sun's rays are spreading, which creates a different effect...

What would be interesting is knowing what technique is used to calculate the lights and shadows and if it provides modern effects, like light bleeding, ambient occlusion, multi-reflection and scattering (getting rid of ambient illumination), hard->soft shadows, etc.

Imho, especially the PBS shaders should be able to handle such realistic features. There should also be algorithms for weaker machines!

@Aceeri

This comment has been minimized.

Copy link
Member

Aceeri commented Aug 7, 2018

@termhn

This comment has been minimized.

@omni-viral

This comment has been minimized.

Copy link
Member

omni-viral commented Aug 9, 2018

With deferred shading it would be easier to add new lightsource types to lighting pass.

@magnonellie

This comment has been minimized.

Copy link
Contributor

magnonellie commented Aug 9, 2018

We would still need to support forward rendering for stuff like VR that pretty much require MSAA.

@termhn

This comment has been minimized.

Copy link
Member

termhn commented Aug 9, 2018

Clustered forward: some of the benefits of deferred and most of the benefits of forward http://www.cse.chalmers.se/~uffe/clustered_shading_preprint.pdf
also used in doom http://www.adriancourreges.com/blog/2016/09/09/doom-2016-graphics-study/

@torkleyy

This comment has been minimized.

Copy link
Member

torkleyy commented Oct 25, 2018

The task here is to extend support for lighting as far as possible and making sure support is documented accordingly.

bors bot added a commit that referenced this issue Oct 28, 2018

Merge #1081
1081: SpotLight support for PBM pass r=jojolepro a=karroffel

See #855.

This PR adds support for `SpotLight`s in the PBM render pass as well as adding a new example to showcase the lights.

While doing so I encountered that that the `SpotLight` type had obsolete & less-suitable fields and I changed them.

This PR depends on the refactor done in #1074

Here a screenshot of the new example:
![screenshot_2018-10-28_15-20-15](https://user-images.githubusercontent.com/5209613/47617278-b7b05800-dac5-11e8-9a55-f523ef51a330.png)


Co-authored-by: Thomas Herzog <therzog@mail.de>

bors bot added a commit that referenced this issue Oct 30, 2018

Merge #1074
1074: added directional light support to PBM shader r=Moxinilian a=karroffel

This PR implements directional light processing in the PBM shader. See #855 

![image](https://user-images.githubusercontent.com/5209613/47609659-34e6b900-da43-11e8-8001-b339903eb381.png)

This just takes the existing lighting code and refactors it to use it for directional lights as well, so any previous issues will most likely not be fixed by this. But that could be a challenge for next time 😉 

Co-authored-by: Thomas Herzog <therzog@mail.de>
@karroffel

This comment has been minimized.

Copy link
Contributor

karroffel commented Oct 30, 2018

In #1081 and #1074 I added support for DirectionalLights and SpotLights to the PBM pass.

SpotLights have not been implemented anywhere in Amethyst before, so please test for any weird behaviours.

I only touched the PBM pass, so the shaded pass will not handle SpotLights yet, but this should be a good start

bors bot added a commit that referenced this issue Oct 30, 2018

Merge #1081
1081: SpotLight support for PBM pass r=Moxinilian a=karroffel

See #855.

This PR adds support for `SpotLight`s in the PBM render pass as well as adding a new example to showcase the lights.

While doing so I encountered that that the `SpotLight` type had obsolete & less-suitable fields and I changed them.

This PR depends on the refactor done in #1074

Here a screenshot of the new example:
![screenshot_2018-10-28_15-20-15](https://user-images.githubusercontent.com/5209613/47617278-b7b05800-dac5-11e8-9a55-f523ef51a330.png)


Co-authored-by: Thomas Herzog <therzog@mail.de>

@azriel91 azriel91 modified the milestones: 0.10, 0.11 Nov 27, 2018

@fhaynes fhaynes added type: improvement and removed type: task labels Jan 8, 2019

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