Exemple #1
0
void sbl_alfa_pruhledny(void)
{
  blend_on();
  alfa_test_on();
  glAlphaFunc(GL_GREATER, 0.004f);
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
Exemple #2
0
void LLDrawPoolWLSky::renderHeavenlyBodies()
{
	LLGLSPipelineSkyBox gls_skybox;
	LLGLEnable blend_on(GL_BLEND);
	gPipeline.disableLights();

#if 0 // when we want to re-add a texture sun disc, here's where to do it.
	LLFace * face = gSky.mVOSkyp->mFace[LLVOSky::FACE_SUN];
	if (gSky.mVOSkyp->getSun().getDraw() && face->getGeomCount())
	{
		LLViewerTexture * tex  = face->getTexture();
		gGL.getTexUnit(0)->bind(tex);
		LLColor4 color(gSky.mVOSkyp->getSun().getInterpColor());
		LLFacePool::LLOverrideFaceColor color_override(this, color);
		face->renderIndexed();
	}
#endif

	LLFace * face = gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON];

	if (gSky.mVOSkyp->getMoon().getDraw() && face->getGeomCount())
	{
		// *NOTE: even though we already bound this texture above for the
		// stars register combiners, we bind again here for defensive reasons,
		// since LLImageGL::bind detects that it's a noop, and optimizes it out.
		gGL.getTexUnit(0)->bind(face->getTexture());
		LLColor4 color(gSky.mVOSkyp->getMoon().getInterpColor());
		F32 a = gSky.mVOSkyp->getMoon().getDirection().mV[2];
		if (a > 0.f)
		{
			a = a*a*4.f;
		}
			
		color.mV[3] = llclamp(a, 0.f, 1.f);
		
		if (gPipeline.canUseVertexShaders())
		{
			gHighlightProgram.bind();
		}

		LLFacePool::LLOverrideFaceColor color_override(this, color);
		
		face->renderIndexed();

		if (gPipeline.canUseVertexShaders())
		{
			gHighlightProgram.unbind();
		}
	}
}
Exemple #3
0
void sbl_alfa_kour(void)
{
  blend_on();
  alfa_test_off();
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_COLOR);
}
Exemple #4
0
void sbl_alfa_flek(void)
{
  blend_on();
  alfa_test_off();
  glBlendFunc(GL_ZERO, GL_SRC_COLOR);
}