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
Merged

Conversation

@SouzaGuilherme
Copy link
Contributor

SouzaGuilherme commented May 6, 2019

Closes #27061

@SouzaGuilherme SouzaGuilherme requested a review from reduz as a code owner May 6, 2019
@YeldhamDev YeldhamDev added this to the 3.2 milestone May 6, 2019
@clayjohn

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

qarmin commented May 6, 2019

Shouldn't you use

#ifndef SHADOWS_DISABLED

instead

#if !defined(SHADOWS_DISABLED)

?

@clayjohn

This comment has been minimized.

Copy link
Contributor

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 <gdsdsilva@inf.ufpel.edu.br>
@SouzaGuilherme SouzaGuilherme force-pushed the SouzaGuilherme:fix_shadows branch from d3ea862 to b363125 May 7, 2019
@akien-mga akien-mga merged commit a0a5047 into godotengine:master May 13, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@akien-mga

This comment has been minimized.

Copy link
Member

akien-mga commented May 13, 2019

Thanks!

@akien-mga

This comment has been minimized.

Copy link
Member

akien-mga commented Jul 9, 2019

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
5 participants
You can’t perform that action at this time.