UE4. Creating "reflection" texture coordinates for cubemap inside PostProcess material

Hi guys :slight_smile:

Can some one point me to right direction. I need to create a texture coordinates for cubemap texture inside postprocess material for entire scene.
In case of PP material we have worldnormal’s and thats all. ReflectionVector would be generated not for scene, but for screen quad (i believe). So naive solution to use it - will false )

Some quite close (but not enought) solution are: worldnormal+(cameradirectionvector*~0.6) which gives reflection on a sphere looking and behave when we move our camera pretty close to ordinary material with custom cubemap and reflectionvector used as texcoord.
But the problem is what every flat surfaces will reflect only (i believe) one pixel from cubemaptexture.

So in case of classic material with reflectionvector and cubemap, flat polygon will reflect some sky and clouds.
In case of PP with WN+(CDV*~0.6) our polugon will be filled entirely filled with one pixel from cubemap and when we will move our camera, sometimes polygon will be filled blue (we sample some 1 pixel of sky) sometimes white (cause we not sample some 1 pixels of clouds).
But we need “full” or “ordinary” reflection.

Im not really a math guy, so, probably my explanations can sounds a little clumsy and stupid :sweat:



from RSSMix.com Mix ID 8320141 http://bit.ly/2Y3jYNe

Comments