Hello. When I use world displacement, I want the scene texture to be affected as well. But when I use scene texture, I have to choose the screen coordinate for its uv. This time, the texture is not affected by displacement. How do I achieve this? Since my English is not good, I prepared a video to explain the problem better. Thanks in advance.
in DX9 I was doing like this;
//VERTEX SHADER
//before displacement
float4 pM= mul(In.Pos,matWorldViewProj);
Out.Tex1=pM;
tex2Dlod...etc..
//PIXEL SHADER
float3 refract_uv;
refract_uv.x = 0.5 * (i.Tex1.w + i.Tex1.x);
refract_uv.y = 0.5 * (i.Tex1.w - i.Tex1.y);
refract_uv.z = i.Tex1.w * 1;
float4 waterRefract=tex2D(refractSampler,refract_uv.xy/refract_uv.z);
In the Material editor, however, some things seem to be limited. As far as I know, there is no way I can do such a thing. What do you guys recommend?