Hi all. I am new in vvvv. I having a problem doing a displacement map shader.I not sure if is a problem with texture coordinates or camera matrix multiplications in the shader.
The deformation is done at vertex shader to a grid by texture work in theory (moving z). When you rotate the camera you see that the mode image look right only in some camera orientations. Big thx.
texture access in vertexshaders is very limited. it definitely requires a vs_3_0 capable nvidia graphic card.
also it seems the texture format of the displacement texture is important. for me on a geforce6800 it only works with the 32bit floating point formats. on the displacement filetexture node you have to specify a specific 32bit format, ie:
R32F
or
A32B32G32R32F
seems mar.canet uses a newer card that supports more texture formats in vertexshaders? can you tell us which card you are using?
in the shader code there is a constant value of 15 that specifies the amount of displacement. you can easily exchange that with a value controlled via a pin. specify the variable in the parameter section like this:
float DisplacementAmount = 15; //giving it a default of 15
this will give you a pin on the effect node with that same name.
then you can use the variable DisplacementAmount instead of the constant value of 15 below in the code. voila.
Joreg it is true now is a fix amount of 1 in mine but can be defined as a global variable and an be changed from patch.
I am using a Nvidia - Geforce 8600 GT (the one in the new macbook pro).
I took a look to Sanch’s one,and do similar approach but he has a dynamic displacement texture.
Well I think it is better not make mipMapping to the displacement texture and setup as a point. MipMapping it is used to scale different texures to see well when is far away (ex: texture applied to a floor).