Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

Why texCUBE always return zero?

Started by gder Jun 4, 2010 at 11:06 AM 1 replies 1k views
Original Post
gder
gder
Hi,all

I find that texCUBE always return zero using Pix debug tool, the inReflect coodinate isn't zero; Does anyone know the error? Thanks!

This is my code:


texture EnvironmentMap
<
string type = "CUBE";
string name = "Snow.dds";
>;

samplerCUBE EnvMap = sampler_state
{
Texture = (EnvironmentMap);
MipFilter = LINEAR;
MinFilter = LINEAR;
MagFilter = LINEAR;
AddressU = Wrap;
AddressV = Wrap;
};


sampler2D Wood;



float4 Main(float2 inTxr: TEXCOORD0,float3 inReflect: TEXCOORD1) : COLOR
{
float4 tmp=texCUBE(EnvMap,inReflect.xyz);
return tmp;
}
InvalidPointer
InvalidPointer
You're certain that the texture loaded correctly and isn't black?
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.
gder
gder
Thank you for your hint, now i use D3DXCreateCubeTextureFromFile,it's OK!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.