Quantcast
Channel: Question and Answer » hlsl
Viewing all articles
Browse latest Browse all 69

Blending Lightmaps and Dynamic Texture Shadows in HLSL

$
0
0

I’m using Gile[s] as my lightmapper and my engine can execute HLSL scripts with DirectX 9.

I would like to accomplish something like this for performance reasons. I was told that this technique can only be done by shaders.

Lightmap and Shadow Blending

Someone has provided me with a quick code example and starting code but it is still far from being implemented.

lightmapColor*=shadowmapValue;
colorIntensity = (lightmapColor.r+lightmapColor.g+lightmapColor.b)/3.0;
lightCol = (1-colorIntensity)*ambient+(colorIntensity)*lightmapColor;

Not sure if it is applicable in my engine so I am looking for some guidance and perhaps some basic hlsl code to accomplish this. My lightmap texture uses the UV2 Channel if it helps. Thanks.


Viewing all articles
Browse latest Browse all 69

Latest Images

Trending Articles



Latest Images