How would one go about making a shader in UDK that blurs a reflection? I cant find any info on blurring a cube map in the engine unless maybe in the dx11 version. I want to do it in dx9. Would I have to manually make 4 different cube maps myself or can I use a custom shader node to write the hlsl myself? I've tried the hlsl custom node but I can't seem to get anything to display using a cube map. It seems to only like tex2D look ups.
Here is a shot of my simple test code and the errors I'm getting plus a link to what Im looking to achieve:
http://developer.amd.com/archive/gpu/cubemapgen/pages/default.aspx
also my code may be wrong:
Replies
I posted the same question on the epic forums regarding texCUBElod (essentially the same thing) and nobody seemed to know.
Would have thought that they'd have support for the HLSL builtins, but I guess not.
By the way, instead of having a float4 passed in as the bias, you can make that a single float. Then when passing it in to the sampler, do:
float4(1, 1, 1, bias)
Makes for a bit easier editing in theory once it's in a master shader or whatever... if it worked at all in Unreal.
Tex2d's seem to work fine.
Really it depends on how you're planning to do the blur, and what level of fidelity you need.
I've tackled this problem a couple times, and the way it seems to work best is with the cube map version of a box blur. It IS a bit expensive. 64 instructions for the box blur portion, but fewer passes might do just as well.
I have yet to get a cubemap to be manipulable in a custom node, even in the lastest UDK build.
So here, have a vid or two..
[ame]http://www.youtube.com/watch?v=mvBr5DkBC6g[/ame]
[ame]http://www.youtube.com/watch?v=L5Nt86-BENQ[/ame]