kwin: Rename sample to sampler in all shaders

A sample is not the same thing as a sampler.
This commit is contained in:
Fredrik Höglund 2011-02-17 18:44:52 +01:00
parent d2078d4b9b
commit af92a4efd4
9 changed files with 17 additions and 17 deletions

View file

@ -277,7 +277,7 @@ bool CubeEffect::loadShader()
return false;
} else {
shaderManager->pushShader(cylinderShader);
cylinderShader->setUniform("sample", 0);
cylinderShader->setUniform("sampler", 0);
QMatrix4x4 projection;
float fovy = 60.0f;
float aspect = 1.0f;
@ -308,7 +308,7 @@ bool CubeEffect::loadShader()
return false;
} else {
shaderManager->pushShader(sphereShader);
sphereShader->setUniform("sample", 0);
sphereShader->setUniform("sampler", 0);
QMatrix4x4 projection;
float fovy = 60.0f;
float aspect = 1.0f;

View file

@ -1,4 +1,4 @@
uniform sampler2D sample;
uniform sampler2D sampler;
uniform vec4 u_capColor;
uniform float u_opacity;
uniform int u_mirror;
@ -16,7 +16,7 @@ vec2 mirrorTex(vec2 coords) {
void main() {
vec4 color = u_capColor;
vec2 texCoord = mirrorTex(varyingTexCoords);
vec4 tex = texture2D(sample, texCoord);
vec4 tex = texture2D(sampler, texCoord);
if (texCoord.s < 0.0 || texCoord.s > 1.0 ||
texCoord.t < 0.0 || texCoord.t > 1.0) {
tex = u_capColor;

View file

@ -1,4 +1,4 @@
uniform sampler2D sample;
uniform sampler2D sampler;
uniform float opacity;
uniform float brightness;
uniform float saturation;
@ -7,7 +7,7 @@ varying vec2 varyingTexCoords;
void main()
{
vec4 tex = texture2D(sample, varyingTexCoords);
vec4 tex = texture2D(sampler, varyingTexCoords);
if( saturation != 1.0 )
{
vec3 desaturated = tex.rgb * vec3( 0.30, 0.59, 0.11 );

View file

@ -1,4 +1,4 @@
uniform sampler2D sample;
uniform sampler2D sampler;
uniform sampler2D startOffsetTexture;
uniform sampler2D endOffsetTexture;
uniform float factor;
@ -40,7 +40,7 @@ void main()
#endif
vec2 transformedtexcoord = pix2tex(rstart + dist);
vec3 tex = texture2D(sample, transformedtexcoord).rgb;
vec3 tex = texture2D(sampler, transformedtexcoord).rgb;
#if 0
// ATM we ignore custom opacity values because Fade effect fades out the
// window which results in the explosion being way too quick. Once there's

View file

@ -1,4 +1,4 @@
uniform sampler2D sample;
uniform sampler2D sampler;
uniform vec4 modulation;
uniform float textureWidth;
uniform float textureHeight;
@ -9,7 +9,7 @@ varying vec2 varyingTexCoords;
void main()
{
vec4 tex = texture2D(sample, varyingTexCoords);
vec4 tex = texture2D(sampler, varyingTexCoords);
if (u_forceAlpha > 0) {
tex.a = 1.0;

View file

@ -1,4 +1,4 @@
uniform sampler2D sample;
uniform sampler2D sampler;
uniform vec2 u_cursor;
uniform float u_zoom;
uniform float u_radius;
@ -20,6 +20,6 @@ void main()
texcoord = texcoord/u_textureSize;
texcoord.t = 1.0 - texcoord.t;
gl_FragColor = texture2D(sample, texcoord);
gl_FragColor = texture2D(sampler, texcoord);
}

View file

@ -1,4 +1,4 @@
uniform sampler2D sample;
uniform sampler2D sampler;
uniform float textureWidth;
uniform float textureHeight;
uniform vec4 u_color;
@ -7,7 +7,7 @@ varying vec2 varyingTexCoords;
void main()
{
vec4 tex = texture2D(sample, varyingTexCoords);
vec4 tex = texture2D(sampler, varyingTexCoords);
if (tex.a != 1.0) {
tex = u_color;
}

View file

@ -1327,7 +1327,7 @@ void ShaderManager::resetShader(ShaderType type)
}
//shader->setUniform("debug", 0);
shader->setUniform("sample", 0);
shader->setUniform("sampler", 0);
shader->setUniform(GLShader::ProjectionMatrix, projection);
shader->setUniform(GLShader::ModelViewMatrix, modelView);

View file

@ -1,4 +1,4 @@
uniform sampler2D sample;
uniform sampler2D sampler;
uniform vec4 modulation;
uniform float saturation;
uniform int debug;
@ -9,7 +9,7 @@ varying vec2 varyingTexCoords;
//varying vec4 color;
void main() {
vec4 tex = texture2D(sample, varyingTexCoords);
vec4 tex = texture2D(sampler, varyingTexCoords);
if (u_forceAlpha > 0) {
tex.a = 1.0;