Hey,

I've been trying to convert some stuff from shadertoy into HLSL and faced this textureLod thing:
Code
vec3 col = textureLod(iChannel0, UV+n, focus).rgb;
Here how I tried to solve it:
Code
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)...
[Linked Image]

Then I tried this:
Code
Texture2D MyTexture;


float4 FP(float2 fragCoord: VPOS) : COLOR
{
	/// ... ///
	
	float3 col = MyTexture.SampleLevel(postTex, UV+n, focus).rgb;
	
	/// ... ///
}
But it gave me malfunction W1550:
[Linked Image]

Here is original version:
https://www.shadertoy.com/view/ltffzl

Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung