Sign in to follow this  
genesys

HLSL & bumpmapping

Recommended Posts

hi! I know how to create bumpmapping from an RGB normalmap in an HLSL shader - that's quite easy... But how do i use a grayscale map to create a bump effect? Or how do i convert from grayscale highinformation to RGB noraml information in the shader itself? I know how to convert a grayscale bumpmap to an RGB normalmap in photoshop - but that doesn't help me in that case because i'm using a black/white 3dvolume DDS map... so i must do the conversion in the shader. Thx :)

Share this post


Link to post
Share on other sites
hum . . . but i can't imagine how this shold work with a Volume map - because the D3DXComputeNormalMap is performed before the HLSL shader uses the map - and i don't think a 3D volume normalmap can exist.... so you must create the normalmap after you textured the object with the 3d grayscale map i think...

Share this post


Link to post
Share on other sites
there shouldnt be a problem with doing it in the shader.
you can do multiple texture lookups on the height map and calculate the normal from that heights.
i never tried it though...

Share this post


Link to post
Share on other sites
rendermonkey has got a example file called normalmap filter, which does this... i could just copy the code and try to get it to work, but i'd like to understand the logic behind it!

Can someone explain me how this works?

Share this post


Link to post
Share on other sites
btw.

I heard that there are a lot of different ways to do bumpmapping with grayscale textures . . . Some of them are better for performance - even without pixelshading - just by using different passes...


Someone's got some informations?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this