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

Pass viewport size to shadow pass instead of using Vector2i(1,1) #83491

Merged

Conversation

jsjtxietian
Copy link
Contributor

@jsjtxietian jsjtxietian commented Oct 17, 2023

Fixes #82782

Two things to improve:

  1. the argument order, I put p_viewport_size to the last but it may better be inserted somewhere front
  2. If 1 is ok and in general this commit is ok, I will port it to compatibility mode.

@clayjohn
Copy link
Member

Two things to improve:

  1. the argument order, I put p_viewport_size to the last but it may better be inserted somewhere front
  2. If 1 is ok and in general this commit is ok, I will port it to compatibility and mobile mode.

Putting it last is fine. This commit looks fine, please make the same change to the compatibility renderer and then it should be ready to merge!

@jsjtxietian jsjtxietian force-pushed the pass-screen-size-when-render-shadow branch 2 times, most recently from d85a2b0 to 42a7884 Compare October 17, 2023 12:42
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.

Looks good to me!

Let's not cherrypick this one as it will introduce a behaviour change if someone was erroneously relying on VIEWPORT_SIZE being (1,1) (for example to modify the shader when in a shadow pass)

@jsjtxietian jsjtxietian force-pushed the pass-screen-size-when-render-shadow branch from 42a7884 to 26d3255 Compare October 26, 2023 07:25
@akien-mga akien-mga changed the title Pass viewport size to shadow pass instead of using vector2i(1,1) Pass viewport size to shadow pass instead of using Vector2i(1,1) Oct 26, 2023
@akien-mga akien-mga merged commit 815b24d into godotengine:master Oct 26, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

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.

spatial shader: using VIEWPORT_SIZE in VERTEX calculation breaks shadows
4 participants