- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/opengl/gl2paintengineex/qglengineshadersource_p.h
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 107 107 gl_Position = vec4(transformedPos.xy, 0.0, transformedPos.z); \n\ 108 108 }\n"; 109 110 static const char* const qglslComplexGeometryPositionOnlyVertexShader = "\n\ 111 uniform highp mat3 matrix; \n\ 112 attribute highp vec2 vertexCoordsArray; \n\ 113 void setPosition(void) \n\ 114 { \n\ 115 gl_Position = vec4(matrix * vec3(vertexCoordsArray, 1), 1);\n\ 116 } \n"; 109 117 110 118 static const char* const qglslUntransformedPositionVertexShader = "\n\ … … 275 283 uniform highp vec2 invertedTextureSize; \n\ 276 284 uniform highp mat3 brushTransform; \n\ 277 varying highp vec2 textureCoords; \n\285 varying highp vec2 brushTextureCoords; \n\ 278 286 void setPosition(void) \n\ 279 287 { \n\ … … 285 293 mediump float invertedHTexCoordsZ = 1.0 / hTexCoords.z; \n\ 286 294 gl_Position = vec4(gl_Position.xy * invertedHTexCoordsZ, 0.0, invertedHTexCoordsZ); \n\ 287 textureCoords.xy = (hTexCoords.xy * invertedTextureSize) * gl_Position.w; \n\295 brushTextureCoords.xy = (hTexCoords.xy * invertedTextureSize) * gl_Position.w; \n\ 288 296 }\n"; 289 297 … … 296 304 // TODO: Special case POT textures which don't need this emulation 297 305 static const char* const qglslTextureBrushSrcFragmentShader = "\n\ 298 varying highp vec2 textureCoords; \n\306 varying highp vec2 brushTextureCoords; \n\ 299 307 uniform lowp sampler2D brushTexture; \n\ 300 308 lowp vec4 srcPixel() { \n\ 301 return texture2D(brushTexture, fract( textureCoords)); \n\309 return texture2D(brushTexture, fract(brushTextureCoords)); \n\ 302 310 }\n"; 303 311 #else 304 312 static const char* const qglslTextureBrushSrcFragmentShader = "\n\ 305 varying highp vec2 textureCoords; \n\313 varying highp vec2 brushTextureCoords; \n\ 306 314 uniform lowp sampler2D brushTexture; \n\ 307 315 lowp vec4 srcPixel() \n\ 308 316 { \n\ 309 return texture2D(brushTexture, textureCoords); \n\317 return texture2D(brushTexture, brushTextureCoords); \n\ 310 318 }\n"; 311 319 #endif 312 320 313 321 static const char* const qglslTextureBrushSrcWithPatternFragmentShader = "\n\ 314 varying highp vec2 textureCoords; \n\322 varying highp vec2 brushTextureCoords; \n\ 315 323 uniform lowp vec4 patternColor; \n\ 316 324 uniform lowp sampler2D brushTexture; \n\ 317 325 lowp vec4 srcPixel() \n\ 318 326 { \n\ 319 return patternColor * (1.0 - texture2D(brushTexture, textureCoords).r); \n\327 return patternColor * (1.0 - texture2D(brushTexture, brushTextureCoords).r); \n\ 320 328 }\n"; 321 329 … … 333 341 lowp vec4 srcPixel() \n\ 334 342 { \n" 335 #ifdef QT_OPENGL_ES_2336 // work-around for driver bug337 "return 1.0 * texture2D(imageTexture, textureCoords); \n"338 #else339 343 "return texture2D(imageTexture, textureCoords); \n" 340 #endif341 344 "}\n"; 342 345
Note:
See TracChangeset
for help on using the changeset viewer.