Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


ARB_SHADOW on Intel not working as well like on GeForce


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 WiredCat   Members   -  Reputation: 369

Like
0Likes
Like

Posted 26 November 2012 - 10:11 AM

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)



Posted Image





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 ___, 26 November 2012 - 10:25 AM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS