Credits: Desaxismundi / "displace.fx" by Sanch
deform a mesh by texture with normals and texturing
the new Version has a additional Phong Directional LightSource
Awesome work. I really like it. This is a very good way to show your creativity.
Hey Desaxi, I´ve seen you uploaded a new version of your shader. What did you change?
minor changes...as spotted by antokhio.
Adding this to a patch gives me an instant bluescreen, what are the minimal requirements for this?
seems fine here
I've been trying to do the same, thanks for the hint towards this Sobel-Filter stuff ... I've been trying to do the calculation in VS.
Small fix though:
Neighbouring-Pixel-Calculation ignores amount-Pin for Displacement.
0 or negative values seemed pretty awkward.
So I changed
float tl = abs(tex2D (SampDisplace, In.TexCddispla +texelSize * float2(-1, -1)).x);
float tl = tex2D (SampDisplace, In.TexCddispla +texelSize * float2(-1, -1)).x*amount;
and so on ...
Hope I didn't break anything, but looks good.
Normals were computed for Displacement along Y-Axis, but all helppatches displaced along Z-Axis. Also I changed the float4 normals' w-component to 0 ...
I changed this line:
float4 N = float4(normalize(float3(dX, 1.0f/normalStrength, dY)), 1.0f);
float4 N = float4(normalize(float3(dX, dY, 1.0f/normalStrength)), 0);
hi, is there any way to make this work with fog renderstate in dx9? thx!
anonymous user login