Sun projected on Skydome

Started by
13 comments, last by Ishraam 18 years, 11 months ago
Sorry, don't have a clue. :(
Sirob Yes.» - status: Work-O-Rama.
Advertisement
/*
// 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.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
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 :)

Not all cards support border in harware, make sure to test it and have some kind of falback for it.
Ok thanks for the info.
Right now I'm working on a little demo for my own, so it doesn't really matters.

But if you have any idea of how I could avoid the BORDER thingy, let me know !

This topic is closed to new replies.

Advertisement