Replaced some opengl fixed functions with shaders. Temporary ShyotlUseLegacyRenderPath setting to debug if this change actually improves framerate at all (setting not tied to callbacks. Have to toggle shaders to have stuff pick up the setting change)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @file customalphaF.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
uniform float custom_alpha;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 color = gl_Color*texture2D(diffuseMap, gl_TexCoord[0].xy);
|
||||
color.a *= custom_alpha;
|
||||
gl_FragColor = color;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @file customalphaV.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
gl_FrontColor = gl_Color;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @file glowcombineF.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#extension GL_ARB_texture_rectangle : enable
|
||||
|
||||
uniform sampler2D glowMap;
|
||||
uniform sampler2DRect screenMap;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(glowMap, gl_TexCoord[0].xy) +
|
||||
texture2DRect(screenMap, gl_TexCoord[1].xy);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @file glowcombineV.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
gl_TexCoord[1] = gl_MultiTexCoord1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @file occlusionF.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = vec4(1,1,1,1);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @file uiV.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* @file twotextureaddF.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
uniform sampler2D tex0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float alpha = texture2D(tex0, gl_TexCoord[0].xy).a * gl_Color.a;
|
||||
|
||||
gl_FragColor = vec4(gl_Color.rgb, alpha);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @file solidcolorV.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
gl_FrontColor = gl_Color;
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @file twotextureaddF.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
uniform sampler2D tex0;
|
||||
uniform sampler2D tex1;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(tex0, gl_TexCoord[0].xy)+texture2D(tex1, gl_TexCoord[1].xy);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @file twotextureaddV.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
gl_TexCoord[1] = gl_MultiTexCoord1;
|
||||
}
|
||||
|
||||
13
indra/newview/app_settings/shaders/class1/interface/uiF.glsl
Normal file
13
indra/newview/app_settings/shaders/class1/interface/uiF.glsl
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @file uiF.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = gl_Color*texture2D(diffuseMap, gl_TexCoord[0].xy);
|
||||
}
|
||||
16
indra/newview/app_settings/shaders/class1/interface/uiV.glsl
Normal file
16
indra/newview/app_settings/shaders/class1/interface/uiV.glsl
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @file uiV.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
||||
gl_TexCoord[0] = gl_MultiTexCoord0;
|
||||
gl_FrontColor = gl_Color;
|
||||
}
|
||||
|
||||
17
indra/newview/app_settings/shaders/class1/objects/bumpF.glsl
Normal file
17
indra/newview/app_settings/shaders/class1/objects/bumpF.glsl
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @file bumpF.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
uniform sampler2D texture0;
|
||||
uniform sampler2D texture1;
|
||||
|
||||
void main()
|
||||
{
|
||||
float tex0 = texture2D(texture0, gl_TexCoord[0].xy).a;
|
||||
float tex1 = texture2D(texture1, gl_TexCoord[1].xy).a;
|
||||
|
||||
gl_FragColor = vec4(tex0+(1.0-tex1)-0.5);
|
||||
}
|
||||
16
indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
Normal file
16
indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @file bumpV.glsl
|
||||
*
|
||||
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
//transform vertex
|
||||
gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex;
|
||||
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
|
||||
gl_TexCoord[1] = gl_TextureMatrix[1] * gl_MultiTexCoord1;
|
||||
gl_FrontColor = gl_Color;
|
||||
}
|
||||
Reference in New Issue
Block a user