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

Fix SHADOWS_DISABLED flag in GLES2 #28723

Merged
merged 1 commit into from
May 13, 2019

Conversation

SouzaGuilherme
Copy link
Contributor

Closes #27061

@clayjohn
Copy link
Member

clayjohn commented May 6, 2019

You will need to add this in a few other places as well. Just search through the file for USE_SHADOW. The shadow code for the different types of lights are all in different sections. So you need to make sure shadows get disabled for all of them. Currently, this is just disabling shadows for directional lights, shadows for omni lights and spotlights still need to be disabled.

@qarmin
Copy link
Contributor

qarmin commented May 6, 2019

Shouldn't you use

#ifndef SHADOWS_DISABLED

instead

#if !defined(SHADOWS_DISABLED)

?

@clayjohn
Copy link
Member

clayjohn commented May 6, 2019

@qarmin Usually it is ifndef when there is one item and then !defined() when there is mulitple, however GLES3 uses !defined(SHADOWS_DISABLED) everytime.

#if !defined(SHADOWS_DISABLED)

#if !defined(SHADOWS_DISABLED)

#if !defined(SHADOWS_DISABLED)

In this case it is likely best to combine it with the USE_SHADOW define. as #if defined(USE_SHADOW) && !defined(SHADOWS_DISABLED)

Signed-off-by: Guilherme Souza <[email protected]>
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.1.2.

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.

GLES2 "Do not Receive Shadows" is not working
5 participants