Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

LightAttenuationTexture & LightAttenuationTextureSampler are returning garbage in 4.17.1

Hello guys,

We're using custom shader for making shadows from movable directional light on a plane with unlit material. Here is the code:

 float s = Texture2DSampleLevel(LightAttenuationTexture, LightAttenuationTextureSampler, UV, 0).x;
 s = saturate(s);
 return float4(s, 1-s, s, s);

Last engine's version where it works properly is custom dev-ar-kit branch. After release of 4.17 and 4.17.1 LightAttenuationTexture looks like garbaged data or some another texture from memory and depending on camera position.

Thank you :)

Product Version: UE 4.17
more ▼

asked Aug 24 '17 at 06:55 AM in Rendering

avatar image

190 4 14 21

avatar image NivalVR Sep 05 '17 at 05:06 AM

Anybody? We are now living with ugly modulated shadows :(

avatar image Wilfried.Ayel Jul 11 '18 at 03:15 AM

This post is kinda old but will try my luck. I am having similar issues on my side with mobile builds...zulman, did you guys sort out a solution for that shadow issue? If so, would love to hear about it!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

LightAttenuationTexture is only bound when using the deferred or desktop forward renderer which explains why you're getting junk data.

There should be a way to lookup the CSM shadowmap data with the mobile renderer which should look a lot better than modulated. In MobileBasePassPixelShader.usf, something very similar to all the code in the block under "// Cascaded Shadow Map" should do what you want although you only want the MOVABLE_DIRECTIONAL_LIGHT path, the other case is for blending CSM with lightmaps.

Cheers Jack

more ▼

answered Sep 07 '17 at 08:39 AM

avatar image

515 16 6 19

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question