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"

resolveView() function in shader

Hi, I find the resolveView() reference in most of the vertex shaders e.g. DepthOnlyVertexShader.usf. I'm guessing it produces the necessary view matrices for the current view. Please correct me if I'm wrong. In regards to that, I have a couple of questions.

1) How is the resolveView() function created ? I mean is there a way to look into the function. Turns out, there is no such function in the UE4 codebase.

2) Is it possible to generate the depth buffer from a different viewpoint if I pass the view matrix of that location ? In other words, is it possible to run the resolveView() function from a different viewpoint, even if I am at the current viewpoint ? This would enable me to capture the depth buffer or run any vertex shader from another viewpoint.

Any help in this regards is highly appreciated. Thanks :)

Product Version: UE 4.20
more ▼

asked Sep 05 '18 at 11:08 AM in Rendering

avatar image

16 1 2

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

1 answer: sort voted first

1) ResolveView does nothing more, but determines which view in stereo pair is the shader running in. Contents of the function are generated by shader compiler and not stored in shader files. You can check its content in ShaderCompiler.cpp, around line 2700

2) ResolveView in particular has nothing to do with this. Use a depth only scene capture.

more ▼

answered Sep 05 '18 at 11:37 AM

avatar image

7.9k 130 31 293

avatar image sud7052 Sep 05 '18 at 04:00 PM

Thanks @deathrey, I understand. So in order to do the depth only scene capture, do I need to make changes in the depthOnly shaders ? Or only changes in the c++ layer. It seems like the initialization of the variables of ViewInfo are scattered over the entire codebase. So generating the viewInfo of the different viewpoint might be difficult. Do I have any other alternative ? Can you point me in the direction as to where I can make the changes ?

(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