Sign in to follow this  

Cube Mapping Gone Bad

This topic is 4202 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am using the high level shader language in DirectX 9 to do some cube mapping. It almost works except that there are some stray black pixels appearing on the textured faces. I am completely foxed as to what is causing it as there is no black on the original textures and the lighting is off. Can anyone suggest what the problem might be? My pixel shader looks like this: struct VS_OUTPUT { float4 Position : POSITION; // vertex position float3 TextureUVW : TEXCOORD0; // vertex texture coords }; struct PS_OUTPUT { float4 RGBColor : COLOR0; // Pixel color }; PS_OUTPUT emap_ps( VS_OUTPUT In ) { PS_OUTPUT Output; Output.RGBColor = texCUBE(emapsampler, In.TextureUVW); return Output; } And my sampler looks like this: samplerCUBE emapsampler = sampler_state { Texture = <g_texturecube>; MipFilter = Point; MinFilter = Point; MagFilter = Point; }; My video card is a Radeon 9600.

Share this post


Link to post
Share on other sites
Code looks accurate to me. Could you explain a bit what you mean by "stray black pixels appearing on the textured faces". Are they scattered, or do they form lines (cracks) or some other way to explain it? Or they just single pixels or bigger areas?

Do you get them with linear filtering too?

A screenshot, if possible, would be the best solution. You can use ImageShack to host an image and link to it from here.

Hope this helps.

Share this post


Link to post
Share on other sites
Heres a picture showing the problem. The cube map consists of 6 images with the numbers 0 -> 5 on them. The black pixels seem to occur between the edges of the texture and especially on the corners between 3 images of the cube map.

[url=http://imageshack.us][img=http://img143.imageshack.us/img143/2240/bug1si.jpg][/url]

Share this post


Link to post
Share on other sites

This topic is 4202 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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