Posted By: 3run
textureLod into HLSL - 03/30/20 18:01
Hey,
I've been trying to convert some stuff from shadertoy into HLSL and faced this textureLod thing:
Here how I tried to solve it:
This one does compile, but it doesn't seems to work correctly (doesn't get blurred)...
Then I tried this:
But it gave me malfunction W1550:
Here is original version:
https://www.shadertoy.com/view/ltffzl
Best regards!
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;
Code
float4 s = float4(UV.x + n.x, UV.y + n.y, 0, focus); float3 col = tex2Dlod(postTex, s).rgb;
Then I tried this:
Code
Texture2D MyTexture; float4 FP(float2 fragCoord: VPOS) : COLOR { /// ... /// float3 col = MyTexture.SampleLevel(postTex, UV+n, focus).rgb; /// ... /// }
Here is original version:
https:/
Best regards!