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:
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