Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Window resizing breaks light overlay #5

Open
DunkUK opened this issue Aug 8, 2017 · 0 comments
Open

Window resizing breaks light overlay #5

DunkUK opened this issue Aug 8, 2017 · 0 comments

Comments

@DunkUK
Copy link

DunkUK commented Aug 8, 2017

If I run a scene with some Light2D lights, but then resize the game window, the lights become offset from the intended positions.
I think the lighting is still consistent with the obstacles (as the LightOverlay material's LightSources render target looks sensible though possibly stretched), but it doesn't overlay back correctly to the game.

I'm guessing it's some aspect ratio or scaling value for the overlay shader that isn't being updated.

Edit: I'm using a normals camera, and the normal map render target doesn't resize, so it might be related.
Edit2: Though if I turn NormalMapping off, the lights are in the right place, but then the obstacles are in the wrong place, casting incorrect shadows. Weird.

Tested on Unity 2017.1.0f3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant