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"

Static mesh position changed with camera rotation on low-end android devices?

Hi friends: currently I've hard coded a spherical mesh in c++, and call DrawIndexedPrimitiveUP to draw in in Mobile rendering pipeline, just like any other post-processing, eventually it is a spherical mesh around camera so I can make some screen space effect.

however, I found abnormal effect on low-end android devices(direct draw to the back buffer, do not use HDR render texture), so I finally find out the input position of vertex shader is changing when I rotate my camera, this is hard to believe because the mesh is hard coded like this:

 VBuf = { FVector(0.00000000f,0.00000000f,100.00000000f),

In order to debug it, I set the position of this sphere be a fixed offset next to the camera in vertex shader:

 Output.Position = mul(float4(InPosition + ViewLocation + float3(-200, -200, 200), 1.0f), Unity_VP);

the uniform variables are matrices like below:

     SetShaderValue(RHICmdList, GetVertexShader(), Unity_VP, View->ViewMatrices.GetViewProjectionMatrix());
     SetShaderValue(RHICmdList, GetVertexShader(), ViewLocation, View->ViewMatrices.GetViewOrigin());

shockingly, on PC platform and high-end android devices(using HDR rendering pipeline), the sphere is always at float3(-200, -200, 200) offset next to the camera: alt text

however, on low-end mobile devices(direct darw to back buffer), the sphere is moving when I rotate my camera !!!! it seems that the InPosition (vertex shader input) is changing, I really don't know why, it looks like there's a ghost in my code.

Product Version: UE 4.18
more ▼

asked Feb 13 '18 at 02:54 PM in Rendering

avatar image

6 2 3 5

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

0 answers: sort voted first
Be the first one to answer this question
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