Closed Zyzyl closed 3 years ago
This (probably) isn't a "bug"... more of a problem with how light cookies work with tiled textures... change the texture tiling from repeat to clamp and it should fix the problem. (this should still probably be fixed somehow if it's possible)
Yeah, setting WrapModeU
and WrapModeV
to Clamp does seem to fix the issue in the case of the snowflake image. Though in other cases weird bugs can still occur e.g. Neos Essentials > Textures & Sprites > UIX 9 Slice Profiles > Ethnocentric_logo_white icon
Yeah, you have to have a clear border around your texture for Clamp to work properly.
Yeah @InsaneGrox and @shadowpanther are correct, this is not a bug, you simply need to set the texture wrapping to clamp and make sure there's enough clearance at the borders so the edge pixels don't get stretched like that.
Describe the bug
Light cookie projections from a spot light can repeat on illuminated surfaces if not viewed head-on. See attached images.
Relevant issues
Nothing obvious.
To Reproduce
1) Create new GridSpace world. 2) With standard developer tooltip create new quad. 3) Inspect quad, reset rotation, set
Size
to 2x2 in the QuadMesh component 4) Create a child slot under the quad, attach a Light component, and setLightType
enum toSpot
. 5) Set Z position transform of this slot with Light component to -1. The spot light should be visible on the surface of the quad. 5) Open inventory and spawn: Neos Essentials > Textures & Sprites > Particle Effects > Snowflake.png 6) Drag and drop Snowflake image into theLight Cookie
field on the Light component. 7) Look directly at the projected snowflake and move a meter or two backward - projection looks fine, a single snowflake. 8) Rotate the camera and notice that, at more extreme angles, the projection repeats on the quad surface.This is most obvious if in Screen mode and using a very high FOV (e.g. 120). However, it can also be observed at lower FOVs on Screen mode, and VR (tested on Reverb G2). This appears to be related to the
WrapModeU
andWrapModeV
values on the cookie's StaticTexture2D component.Expected behavior
Only a single projected image should be visible regardless of viewing angle.
Screenshots / Video
Expected behaviour, viewed head-on
Unexpected behaviour, viewed from an angle
Bug information (please complete the following information):
Reporters:
Zyzyl#1441