Move fname back inside class loop. grumble stringstream grumble.

Fix sky depth-testing with advanced atmospherics.
meow-7.2.2
Graham Linden 2018-09-10 21:18:37 +01:00
parent 8a162bc59c
commit ef2c61275e
3 changed files with 3 additions and 6 deletions

View File

@ -588,11 +588,10 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
S32 try_gpu_class = shader_level;
S32 gpu_class;
std::stringstream fname;
//find the most relevant file
for (gpu_class = try_gpu_class; gpu_class > 0; gpu_class--)
{ //search from the current gpu class down to class 1 to find the most relevant shader
{ //search from the current gpu class down to class 1 to find the most relevant shader
std::stringstream fname;
fname << getShaderDirPrefix();
fname << gpu_class << "/" << filename;

View File

@ -37,7 +37,7 @@ VARYING vec2 vary_frag;
void main()
{
// pass through untransformed fullscreen pos at back of frustum for proper sky depth testing
gl_Position = vec4(position.xy, 0.99f, 1.0);
gl_Position = vec4(position.xy, 1.0f, 1.0);
vary_frag = texcoord0;
}

View File

@ -324,8 +324,6 @@ void LLVOWLSky::drawFsSky(void)
updateGeometry(mDrawable);
}
//LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_LEQUAL);
LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE, GL_ALWAYS);
LLGLDisable disable_blend(GL_BLEND);
mFsSkyVerts->setBuffer(LLDrawPoolWLSky::ADV_ATMO_SKY_VERTEX_DATA_MASK);