Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Stencil shadows not working


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
5 replies to this topic

#1 invutil   Crossbones+   -  Reputation: 1906

Like
0Likes
Like

Posted 10 September 2012 - 11:55 PM

I copied the tutorial at gametutorials.com but it isn't working

Posted Image

Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7987

Like
0Likes
Like

Posted 11 September 2012 - 01:06 AM

Double post Posted Image

Programming != Copy'n'Paste

#3 invutil   Crossbones+   -  Reputation: 1906

Like
0Likes
Like

Posted 11 September 2012 - 02:35 AM

Oops, I meant shaddow mapping. Stencils have nothing to do with this.

#4 invutil   Crossbones+   -  Reputation: 1906

Like
0Likes
Like

Posted 12 September 2012 - 01:31 AM

Fixed, I didn't know that the model texture was interfering with the shadow map.

Now I use multi-texturing:

glActiveTextureARB(GL_TEXTURE0_ARB);
glUniform1iARB( texture1, 0 );
glActiveTextureARB(GL_TEXTURE1_ARB);
glUniform1iARB( texture2, 1 );
glActiveTextureARB(GL_TEXTURE2_ARB);
glUniform1iARB( shadowMap, 2 );


#5 invutil   Crossbones+   -  Reputation: 1906

Like
0Likes
Like

Posted 13 September 2012 - 11:48 PM

I got the GLSL shadows working from a different example but now the bitmap fonts don't work with the shaders. Anybody know why?

#6 invutil   Crossbones+   -  Reputation: 1906

Like
0Likes
Like

Posted 14 September 2012 - 02:16 AM

Oh, fixed. I had to do this before rendering text:

glActiveTextureARB(GL_TEXTURE0_ARB);
	glDisable(GL_TEXTURE_2D);
	glBindTexture(GL_TEXTURE_2D, NULL);
  
	glActiveTextureARB(GL_TEXTURE1_ARB);
	glDisable(GL_TEXTURE_2D);
	glBindTexture(GL_TEXTURE_2D, NULL);

	glActiveTextureARB(GL_TEXTURE0_ARB);
	glDisable(GL_TEXTURE_2D);
	glBindTexture(GL_TEXTURE_2D, NULL);

Edited by polyfrag, 14 September 2012 - 02:17 AM.





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