Hey,
I've been trying to convert some stuff from shadertoy into HLSL and faced this textureLod thing:
vec3 col = textureLod(iChannel0, UV+n, focus).rgb;
Here how I tried to solve it:
float4 s = float4(UV.x + n.x, UV.y + n.y, 0, focus);
float3 col = tex2Dlod(postTex, s).rgb;
This one does compile, but it doesn't seems to work correctly (doesn't get blurred)...
Then I tried this:
Texture2D MyTexture;
float4 FP(float2 fragCoord: VPOS) : COLOR
{
/// ... ///
float3 col = MyTexture.SampleLevel(postTex, UV+n, focus).rgb;
/// ... ///
}
But it gave me malfunction W1550:
Here is original version:
https://www.shadertoy.com/view/ltffzlBest regards!