Sign in to follow this  
WiredCat

ARB_SHADOW on Intel not working as well like on GeForce

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)


[CODE]
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)
[/CODE]



[img]https://sites.google.com/site/imoomohomozumo/home/Untsitled.jpg[/img]





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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this