• Advertisement
Sign in to follow this  

ARB_SHADOW on Intel not working as well like on GeForce

This topic is 1974 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

So i am making projected shadows - i just project depth texture onto scene:
But on intel graphic cards its seems to not work properly (but i have checked that my intel card supports arb_shadow ext)



here is how i create the texture i think there is the problem
procedure CreateShadowTexture;
begin

glGenTextures(1,&shadow);
glBindTexture(GL_TEXTURE_2D, shadow);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 512, 512, 0, GL_DEPTH_COMPONENT, GL_FLOAT, 0);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL);

glTexParameteri(GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY);

end;


i copy content to depth tex like this:
glBindTexture(GL_TEXTURE_2D, shadow);
glReadBuffer(GL_DEPTH_BUFFER_BIT);
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 0, 0, 512, 512, 0);

shadow is unsigned int (gluint)




Untsitled.jpg





As you can see if i project normal texture (not depth texture) it works fine on Intel, but when i attemp to project depth texture it fails (and it works on nvidia cards)
the code for these 3 images is the same (except the thing with normal tex projection (just did glbindtexture and set the normal texture instead of depth texture)

I couldn't find a solution to this (i don't know if i must specify the formats of depth texture or what) Edited by ___

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement