Sun projected on Skydome
/*
// this one part is to prevent a second sun to be rendered 'on the opposite side'
if( output.sun_texcoord.w >= 0)
output.sun_texcoord.zw = 0;
*/
That doesn't seem right. You should be clamping the q coordinate ('w') to [0,1] and leaving z alone. And actually, you shouldn't be assigning w to z in the first place, since doing so is nonsensical.
// this one part is to prevent a second sun to be rendered 'on the opposite side'
if( output.sun_texcoord.w >= 0)
output.sun_texcoord.zw = 0;
*/
That doesn't seem right. You should be clamping the q coordinate ('w') to [0,1] and leaving z alone. And actually, you shouldn't be assigning w to z in the first place, since doing so is nonsensical.
Holy shit I made it...
I just tried a few other parameters, that is to say
addressU = BORDER;
addressV = BORDER;
instead of CLAMP
and now everything workds fine :)
Thanks everyone !
PS : I don't understand the slight difference...
This is taken from the SDK doc. :
- Border : Texture coordinates outside the range [0.0, 1.0] are set to the border color.
- Clamp : Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively.
The texture I have used (and others I have tested) have a clean border, nothing that would cause the crown.
So If anyone has an explanation, I'd be glad to hear it :)
I just tried a few other parameters, that is to say
addressU = BORDER;
addressV = BORDER;
instead of CLAMP
and now everything workds fine :)
Thanks everyone !
PS : I don't understand the slight difference...
This is taken from the SDK doc. :
- Border : Texture coordinates outside the range [0.0, 1.0] are set to the border color.
- Clamp : Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively.
The texture I have used (and others I have tested) have a clean border, nothing that would cause the crown.
So If anyone has an explanation, I'd be glad to hear it :)
Not all cards support border in harware, make sure to test it and have some kind of falback for it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement