Removed maximum_alpha uniform (as it's always 1.0 anyhow)
This commit is contained in:
@@ -1009,10 +1009,9 @@ void LLGLSLShader::uniformMatrix4fv(const string& uniform, U32 count, GLboolean
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LLGLSLShader::setAlphaRange(F32 minimum, F32 maximum)
|
void LLGLSLShader::setMinimumAlpha(F32 minimum)
|
||||||
{
|
{
|
||||||
uniform1f("minimum_alpha", minimum);
|
uniform1f("minimum_alpha", minimum);
|
||||||
uniform1f("maximum_alpha", maximum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLGLSLShader::vertexAttrib4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
|
void LLGLSLShader::vertexAttrib4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public:
|
|||||||
void uniformMatrix3fv(const std::string& uniform, U32 count, GLboolean transpose, const GLfloat *v);
|
void uniformMatrix3fv(const std::string& uniform, U32 count, GLboolean transpose, const GLfloat *v);
|
||||||
void uniformMatrix4fv(const std::string& uniform, U32 count, GLboolean transpose, const GLfloat *v);
|
void uniformMatrix4fv(const std::string& uniform, U32 count, GLboolean transpose, const GLfloat *v);
|
||||||
|
|
||||||
void setAlphaRange(F32 minimum, F32 maximum);
|
void setMinimumAlpha(F32 minimum);
|
||||||
|
|
||||||
void vertexAttrib4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
void vertexAttrib4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||||
void vertexAttrib4fv(U32 index, GLfloat* v);
|
void vertexAttrib4fv(U32 index, GLfloat* v);
|
||||||
|
|||||||
@@ -741,7 +741,10 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
|
|||||||
{
|
{
|
||||||
if (mAutoGenMips)
|
if (mAutoGenMips)
|
||||||
{
|
{
|
||||||
glTexParameteri(LLTexUnit::getInternalType(mBindTarget), GL_GENERATE_MIPMAP_SGIS, TRUE);
|
if (!gGLManager.mHasFramebufferObject)
|
||||||
|
{
|
||||||
|
glTexParameteri(LLTexUnit::getInternalType(mBindTarget), GL_GENERATE_MIPMAP_SGIS, TRUE);
|
||||||
|
}
|
||||||
stop_glerror();
|
stop_glerror();
|
||||||
{
|
{
|
||||||
// LLFastTimer t2(LLFastTimer::FTM_TEMP4);
|
// LLFastTimer t2(LLFastTimer::FTM_TEMP4);
|
||||||
@@ -770,6 +773,12 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
|
|||||||
stop_glerror();
|
stop_glerror();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gGLManager.mHasFramebufferObject)
|
||||||
|
{
|
||||||
|
//GL_EXT_framebuffer_object implies glGenerateMipmap
|
||||||
|
glGenerateMipmap(LLTexUnit::getInternalType(mBindTarget));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
uniform sampler2D diffuseMap;
|
uniform sampler2D diffuseMap;
|
||||||
|
|
||||||
@@ -17,7 +16,7 @@ void main()
|
|||||||
{
|
{
|
||||||
vec4 col = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
|
vec4 col = gl_Color * texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
|
||||||
|
|
||||||
if (col.a < minimum_alpha || col.a > maximum_alpha)
|
if (col.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,12 @@
|
|||||||
varying vec3 vary_normal;
|
varying vec3 vary_normal;
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 col = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
|
vec4 col = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
|
||||||
|
|
||||||
if (col.a < minimum_alpha || col.a > maximum_alpha)
|
if (col.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
uniform sampler2D diffuseMap;
|
uniform sampler2D diffuseMap;
|
||||||
uniform sampler2D normalMap;
|
uniform sampler2D normalMap;
|
||||||
@@ -15,7 +14,7 @@ uniform sampler2D specularMap;
|
|||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 col = texture2D(diffuseMap, gl_TexCoord[0].xy);
|
vec4 col = texture2D(diffuseMap, gl_TexCoord[0].xy);
|
||||||
if (col.a < minimum_alpha || col.a > maximum_alpha)
|
if (col.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
uniform sampler2D diffuseMap;
|
uniform sampler2D diffuseMap;
|
||||||
|
|
||||||
@@ -16,7 +15,7 @@ void main()
|
|||||||
{
|
{
|
||||||
float alpha = texture2D(diffuseMap, gl_TexCoord[0].xy).a * gl_Color.a;
|
float alpha = texture2D(diffuseMap, gl_TexCoord[0].xy).a * gl_Color.a;
|
||||||
|
|
||||||
if (alpha < minimum_alpha || alpha > maximum_alpha)
|
if (alpha < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
vec3 fullbrightAtmosTransport(vec3 light);
|
vec3 fullbrightAtmosTransport(vec3 light);
|
||||||
vec3 fullbrightScaleSoftClip(vec3 light);
|
vec3 fullbrightScaleSoftClip(vec3 light);
|
||||||
@@ -17,7 +16,7 @@ void main()
|
|||||||
{
|
{
|
||||||
vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
|
vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
|
||||||
|
|
||||||
if (color.a < minimum_alpha || color.a > maximum_alpha)
|
if (color.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
vec3 atmosLighting(vec3 light);
|
vec3 atmosLighting(vec3 light);
|
||||||
vec3 scaleSoftClip(vec3 light);
|
vec3 scaleSoftClip(vec3 light);
|
||||||
@@ -16,7 +15,7 @@ void default_lighting()
|
|||||||
{
|
{
|
||||||
vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
|
vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
|
||||||
|
|
||||||
if (color.a < minimum_alpha || color.a > maximum_alpha)
|
if (color.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
|
|
||||||
uniform sampler2D diffuseMap;
|
uniform sampler2D diffuseMap;
|
||||||
@@ -19,7 +18,7 @@ void default_lighting()
|
|||||||
{
|
{
|
||||||
vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
|
vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
|
||||||
|
|
||||||
if (color.a < minimum_alpha || color.a > maximum_alpha)
|
if (color.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
vec3 fullbrightAtmosTransport(vec3 light);
|
vec3 fullbrightAtmosTransport(vec3 light);
|
||||||
vec3 fullbrightScaleSoftClip(vec3 light);
|
vec3 fullbrightScaleSoftClip(vec3 light);
|
||||||
@@ -15,7 +14,7 @@ void fullbright_lighting()
|
|||||||
{
|
{
|
||||||
vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
|
vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
|
||||||
|
|
||||||
if (color.a < minimum_alpha || color.a > maximum_alpha)
|
if (color.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
vec3 fullbrightAtmosTransport(vec3 light);
|
vec3 fullbrightAtmosTransport(vec3 light);
|
||||||
vec3 fullbrightScaleSoftClip(vec3 light);
|
vec3 fullbrightScaleSoftClip(vec3 light);
|
||||||
@@ -17,7 +16,7 @@ void fullbright_lighting()
|
|||||||
{
|
{
|
||||||
vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
|
vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
|
||||||
|
|
||||||
if (color.a < minimum_alpha || color.a > maximum_alpha)
|
if (color.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
vec4 diffuseLookup(vec2 texcoord);
|
vec4 diffuseLookup(vec2 texcoord);
|
||||||
|
|
||||||
@@ -17,7 +16,7 @@ void fullbright_lighting_water()
|
|||||||
{
|
{
|
||||||
vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
|
vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
|
||||||
|
|
||||||
if (color.a < minimum_alpha || color.a > maximum_alpha)
|
if (color.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
uniform sampler2D diffuseMap;
|
uniform sampler2D diffuseMap;
|
||||||
|
|
||||||
@@ -17,7 +16,7 @@ void fullbright_lighting_water()
|
|||||||
{
|
{
|
||||||
vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
|
vec4 color = texture2D(diffuseMap, gl_TexCoord[0].xy) * gl_Color;
|
||||||
|
|
||||||
if (color.a < minimum_alpha || color.a > maximum_alpha)
|
if (color.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
vec3 atmosLighting(vec3 light);
|
vec3 atmosLighting(vec3 light);
|
||||||
vec4 applyWaterFog(vec4 color);
|
vec4 applyWaterFog(vec4 color);
|
||||||
@@ -15,7 +14,7 @@ void default_lighting_water()
|
|||||||
{
|
{
|
||||||
vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
|
vec4 color = diffuseLookup(gl_TexCoord[0].xy) * gl_Color;
|
||||||
|
|
||||||
if (color.a < minimum_alpha || color.a > maximum_alpha)
|
if (color.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uniform float minimum_alpha;
|
uniform float minimum_alpha;
|
||||||
uniform float maximum_alpha;
|
|
||||||
|
|
||||||
uniform sampler2D diffuseMap;
|
uniform sampler2D diffuseMap;
|
||||||
|
|
||||||
@@ -17,7 +16,7 @@ void default_lighting_water()
|
|||||||
{
|
{
|
||||||
vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
|
vec4 color = texture2D(diffuseMap,gl_TexCoord[0].xy) * gl_Color;
|
||||||
|
|
||||||
if (color.a < minimum_alpha || color.a > maximum_alpha)
|
if (color.a < minimum_alpha)
|
||||||
{
|
{
|
||||||
discard;
|
discard;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ void LLDrawPoolAlpha::renderDeferred(S32 pass)
|
|||||||
{
|
{
|
||||||
LLFastTimer t(LLFastTimer::FTM_RENDER_GRASS);
|
LLFastTimer t(LLFastTimer::FTM_RENDER_GRASS);
|
||||||
gDeferredDiffuseAlphaMaskProgram.bind();
|
gDeferredDiffuseAlphaMaskProgram.bind();
|
||||||
gDeferredDiffuseAlphaMaskProgram.setAlphaRange(0.33f, 1.f);
|
gDeferredDiffuseAlphaMaskProgram.setMinimumAlpha(0.33f);
|
||||||
|
|
||||||
//render alpha masked objects
|
//render alpha masked objects
|
||||||
LLRenderPass::pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
|
LLRenderPass::pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
|
||||||
@@ -143,7 +143,7 @@ void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
|
|||||||
simple_shader = NULL;
|
simple_shader = NULL;
|
||||||
fullbright_shader = NULL;
|
fullbright_shader = NULL;
|
||||||
gObjectFullbrightAlphaMaskProgram.bind();
|
gObjectFullbrightAlphaMaskProgram.bind();
|
||||||
gObjectFullbrightAlphaMaskProgram.setAlphaRange(0.33f, 1.f);
|
gObjectFullbrightAlphaMaskProgram.setMinimumAlpha(0.33f);
|
||||||
}
|
}
|
||||||
|
|
||||||
deferred_render = TRUE;
|
deferred_render = TRUE;
|
||||||
@@ -236,14 +236,14 @@ void LLDrawPoolAlpha::render(S32 pass)
|
|||||||
if (!LLPipeline::sRenderDeferred || !deferred_render)
|
if (!LLPipeline::sRenderDeferred || !deferred_render)
|
||||||
{
|
{
|
||||||
simple_shader->bind();
|
simple_shader->bind();
|
||||||
simple_shader->setAlphaRange(0.33f, 1.f);
|
simple_shader->setMinimumAlpha(0.33f);
|
||||||
|
|
||||||
pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
|
pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
if (fullbright_shader)
|
if (fullbright_shader)
|
||||||
{
|
{
|
||||||
fullbright_shader->bind();
|
fullbright_shader->bind();
|
||||||
fullbright_shader->setAlphaRange(0.33f, 1.f);
|
fullbright_shader->setMinimumAlpha(0.33f);
|
||||||
}
|
}
|
||||||
pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
|
pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
|
||||||
//LLGLSLShader::bindNoShader();
|
//LLGLSLShader::bindNoShader();
|
||||||
@@ -279,16 +279,16 @@ void LLDrawPoolAlpha::render(S32 pass)
|
|||||||
if (LLPipeline::sImpostorRender)
|
if (LLPipeline::sImpostorRender)
|
||||||
{
|
{
|
||||||
fullbright_shader->bind();
|
fullbright_shader->bind();
|
||||||
fullbright_shader->setAlphaRange(0.5f, 1.f);
|
fullbright_shader->setMinimumAlpha(0.5f);
|
||||||
simple_shader->bind();
|
simple_shader->bind();
|
||||||
simple_shader->setAlphaRange(0.5f, 1.f);
|
simple_shader->setMinimumAlpha(0.5f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fullbright_shader->bind();
|
fullbright_shader->bind();
|
||||||
fullbright_shader->setAlphaRange(0.f, 1.f);
|
fullbright_shader->setMinimumAlpha(0.f);
|
||||||
simple_shader->bind();
|
simple_shader->bind();
|
||||||
simple_shader->setAlphaRange(0.f, 1.f);
|
simple_shader->setMinimumAlpha(0.f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -678,7 +678,7 @@ void LLDrawPoolAvatar::beginImpostor()
|
|||||||
if (LLGLSLShader::sNoFixedFunction)
|
if (LLGLSLShader::sNoFixedFunction)
|
||||||
{
|
{
|
||||||
gImpostorProgram.bind();
|
gImpostorProgram.bind();
|
||||||
gImpostorProgram.setAlphaRange(0.01f, 1.f);
|
gImpostorProgram.setMinimumAlpha(0.01f);
|
||||||
}
|
}
|
||||||
|
|
||||||
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
|
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
|
||||||
@@ -710,7 +710,7 @@ void LLDrawPoolAvatar::beginRigid()
|
|||||||
if (sVertexProgram != NULL)
|
if (sVertexProgram != NULL)
|
||||||
{ //eyeballs render with the specular shader
|
{ //eyeballs render with the specular shader
|
||||||
sVertexProgram->bind();
|
sVertexProgram->bind();
|
||||||
sVertexProgram->setAlphaRange(0.2f, 1.f);
|
sVertexProgram->setMinimumAlpha(0.2f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -743,7 +743,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
|
|||||||
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
|
||||||
|
|
||||||
sVertexProgram->bind();
|
sVertexProgram->bind();
|
||||||
sVertexProgram->setAlphaRange(0.01f, 1.f);
|
sVertexProgram->setMinimumAlpha(0.01f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLDrawPoolAvatar::endDeferredImpostor()
|
void LLDrawPoolAvatar::endDeferredImpostor()
|
||||||
@@ -829,7 +829,7 @@ void LLDrawPoolAvatar::beginSkinned()
|
|||||||
//if (LLGLSLShader::sNoFixedFunction) //Singu Note: sNoFixedFunction being false does not imply shaders are off, unlike in V3.
|
//if (LLGLSLShader::sNoFixedFunction) //Singu Note: sNoFixedFunction being false does not imply shaders are off, unlike in V3.
|
||||||
if (gPipeline.canUseVertexShaders()) //Check if shaders are REALLY used.
|
if (gPipeline.canUseVertexShaders()) //Check if shaders are REALLY used.
|
||||||
{
|
{
|
||||||
sVertexProgram->setAlphaRange(0.2f, 1.f);
|
sVertexProgram->setMinimumAlpha(0.2f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ void LLDrawPoolGrass::beginRenderPass(S32 pass)
|
|||||||
if (mVertexShaderLevel > 0)
|
if (mVertexShaderLevel > 0)
|
||||||
{
|
{
|
||||||
simple_shader->bind();
|
simple_shader->bind();
|
||||||
simple_shader->setAlphaRange(0.5f, 1.f);
|
simple_shader->setMinimumAlpha(0.5f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -324,7 +324,7 @@ void LLDrawPoolGrass::renderDeferred(S32 pass)
|
|||||||
LLFastTimer t(LLFastTimer::FTM_RENDER_GRASS);
|
LLFastTimer t(LLFastTimer::FTM_RENDER_GRASS);
|
||||||
//LLFastTimer t(FTM_RENDER_GRASS_DEFERRED);
|
//LLFastTimer t(FTM_RENDER_GRASS_DEFERRED);
|
||||||
gDeferredNonIndexedDiffuseAlphaMaskProgram.bind();
|
gDeferredNonIndexedDiffuseAlphaMaskProgram.bind();
|
||||||
gDeferredNonIndexedDiffuseAlphaMaskProgram.setAlphaRange(0.5f, 1.f);
|
gDeferredNonIndexedDiffuseAlphaMaskProgram.setMinimumAlpha(0.5f);
|
||||||
//render grass
|
//render grass
|
||||||
LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask());
|
LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ void LLDrawPoolTree::beginRenderPass(S32 pass)
|
|||||||
if (gPipeline.canUseVertexShaders())
|
if (gPipeline.canUseVertexShaders())
|
||||||
{
|
{
|
||||||
shader->bind();
|
shader->bind();
|
||||||
shader->setAlphaRange(0.5f, 1.f);
|
shader->setMinimumAlpha(0.5f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -149,7 +149,7 @@ void LLDrawPoolTree::beginDeferredPass(S32 pass)
|
|||||||
|
|
||||||
shader = &gDeferredNonIndexedDiffuseAlphaMaskProgram;
|
shader = &gDeferredNonIndexedDiffuseAlphaMaskProgram;
|
||||||
shader->bind();
|
shader->bind();
|
||||||
shader->setAlphaRange(0.5f, 1.f);
|
shader->setMinimumAlpha(0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLDrawPoolTree::renderDeferred(S32 pass)
|
void LLDrawPoolTree::renderDeferred(S32 pass)
|
||||||
@@ -175,7 +175,7 @@ void LLDrawPoolTree::beginShadowPass(S32 pass)
|
|||||||
static const LLCachedControl<F32> render_deferred_bias("RenderDeferredTreeShadowBias",1.f);
|
static const LLCachedControl<F32> render_deferred_bias("RenderDeferredTreeShadowBias",1.f);
|
||||||
glPolygonOffset(render_deferred_offset,render_deferred_bias);
|
glPolygonOffset(render_deferred_offset,render_deferred_bias);
|
||||||
gDeferredShadowAlphaMaskProgram.bind();
|
gDeferredShadowAlphaMaskProgram.bind();
|
||||||
gDeferredShadowAlphaMaskProgram.setAlphaRange(0.5f, 1.f);
|
gDeferredShadowAlphaMaskProgram.setMinimumAlpha(0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLDrawPoolTree::renderShadow(S32 pass)
|
void LLDrawPoolTree::renderShadow(S32 pass)
|
||||||
|
|||||||
@@ -8129,7 +8129,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
|
|||||||
{
|
{
|
||||||
LLFastTimer ftm(LLFastTimer::FTM_SHADOW_ALPHA);
|
LLFastTimer ftm(LLFastTimer::FTM_SHADOW_ALPHA);
|
||||||
gDeferredShadowAlphaMaskProgram.bind();
|
gDeferredShadowAlphaMaskProgram.bind();
|
||||||
gDeferredShadowAlphaMaskProgram.setAlphaRange(0.6f, 1.f);
|
gDeferredShadowAlphaMaskProgram.setMinimumAlpha(0.6f);
|
||||||
renderObjects(LLRenderPass::PASS_ALPHA_SHADOW, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR, TRUE);
|
renderObjects(LLRenderPass::PASS_ALPHA_SHADOW, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR, TRUE);
|
||||||
glColor4f(1,1,1,1);
|
glColor4f(1,1,1,1);
|
||||||
renderObjects(LLRenderPass::PASS_GRASS, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, TRUE);
|
renderObjects(LLRenderPass::PASS_GRASS, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, TRUE);
|
||||||
|
|||||||
Reference in New Issue
Block a user