Problems with shading and lights

Previous topic - Next topic

erico

I don´t understand what is your problem with the skybox.
Like in my code, isen´t just a matter of appending it to camera movement?
Where is the clipping?

ProN3rd

#46
sure it is, i think there is a misunderstanding, i mean not clipping, but edgeclamping.

If i was to use skybox-graphics for the cube, i would have either have to draw 8 objects (all of them being surfaces with different textures), or draw 1 cube-objects that uses a huge textures where each face has differnt texture coordinates.

for the first approach, all edges of the cube dont go smoothly into each other. The 2nd approach has only some edges run smoothly into each other.

The texture is simply not "clamped" to the edge of the surface. As far as i read in the internet this seems to be a commond problem that occurs especially on skyboxes. OpenGL therefore provides to command "Clamp_to_edge". However i do not know how to include it in GLBasic.

This is exactly what i mean: http://gamedev.stackexchange.com/questions/11931/skybox-texture-artifact-on-edge It describes the problem along with the solution and a screenshot.


erico

I see, but that dosen´t happen on my testings, I´m using the second approach, a huge uvmapped imported cube.
I´m drawing it before lights, so it is always fully lit.

Do you think this could help you out?

nabz32

I haven´t got a problem with clamping, since I switched to a sky cylinder,

if you want the code, just answer here.

erico

No need it´s fine, if you wish, you can put it on snippets, so future chaps can check it out.
Glad everything is fine. :good:

ProN3rd

#50
that would be awesome nabz

lol i crashed my graphics card with too much shading -_-
so that topic is out of the question at least for now

but i found some very nice open gl examples in the snippets section, INLINE here i come :)

by the way, i tried many things to make a texture of irregular size (like 237*183)  fit on a billbord rectangle surface but I seems like only texture sizes with a multiple of n^2 work correctly. Can anyone confirm this?