¡@

Home 

2014/10/15 ¤U¤È 10:15:44

iphone Programming Glossary: vec2

How do I blend two textures with different co-ordinates in OpenGL ES 2.0 on iPhone?

http://stackoverflow.com/questions/12242443/how-do-i-blend-two-textures-with-different-co-ordinates-in-opengl-es-2-0-on-ipho

GL_RENDERBUFFER Vertex shader... attribute vec4 position attribute vec4 inputTextureCoordinate varying vec2 textureCoordinate void main gl_Position position textureCoordinate inputTextureCoordinate.xy Fragment shader... varying.. void main gl_Position position textureCoordinate inputTextureCoordinate.xy Fragment shader... varying highp vec2 textureCoordinate uniform sampler2D inputTextureTop uniform sampler2D inputTextureBot uniform highp float alphaTop void.. Shader attribute vec4 position attribute vec4 inputTextureCoordinate attribute vec4 inputTextureCoordinate2 varying vec2 textureCoordinate varying vec2 textureCoordinate2 void main gl_Position position textureCoordinate inputTextureCoordinate.xy..

How do I modify a GPUImageGaussianSelectiveBlurFilter to operate over a rectangle instead of a circle?

http://stackoverflow.com/questions/12257429/how-do-i-modify-a-gpuimagegaussianselectiveblurfilter-to-operate-over-a-rectangl

clarify my comment above. The fragment shader for the selective blur by default has the following code varying highp vec2 textureCoordinate varying highp vec2 textureCoordinate2 uniform sampler2D inputImageTexture uniform sampler2D inputImageTexture2.. shader for the selective blur by default has the following code varying highp vec2 textureCoordinate varying highp vec2 textureCoordinate2 uniform sampler2D inputImageTexture uniform sampler2D inputImageTexture2 uniform lowp float excludeCircleRadius.. sampler2D inputImageTexture uniform sampler2D inputImageTexture2 uniform lowp float excludeCircleRadius uniform lowp vec2 excludeCirclePoint uniform lowp float excludeBlurSize uniform highp float aspectRatio void main lowp vec4 sharpImageColor..

How do I perform a fast pixellation filter on an image?

http://stackoverflow.com/questions/5049041/how-do-i-perform-a-fast-pixellation-filter-on-an-image

width in the processed image This filter is the result of a fragment shader with the following GLSL code varying highp vec2 textureCoordinate uniform sampler2D inputImageTexture uniform highp fractionalWidthOfPixel void main highp vec2 sampleDivisor.. highp vec2 textureCoordinate uniform sampler2D inputImageTexture uniform highp fractionalWidthOfPixel void main highp vec2 sampleDivisor vec2 fractionalWidthOfPixel highp vec2 samplePos textureCoordinate mod textureCoordinate sampleDivisor gl_FragColor.. uniform sampler2D inputImageTexture uniform highp fractionalWidthOfPixel void main highp vec2 sampleDivisor vec2 fractionalWidthOfPixel highp vec2 samplePos textureCoordinate mod textureCoordinate sampleDivisor gl_FragColor texture2D..

How can I improve the performance of my custom OpenGL ES 2.0 depth texture generation?

http://stackoverflow.com/questions/6051237/how-can-i-improve-the-performance-of-my-custom-opengl-es-2-0-depth-texture-gener

I'm limited by fragment processing . It currently looks like the following precision mediump float varying mediump vec2 impostorSpaceCoordinate varying mediump float normalizedDepth varying mediump float adjustedSphereRadius const vec3 stepValues.. this case that led to better performance than otherwise. When I simplify it to precision mediump float varying mediump vec2 impostorSpaceCoordinate varying mediump float normalizedDepth varying mediump float adjustedSphereRadius void main gl_FragColor.. from where I started. For posterity here is the depth shader I'm now using precision mediump float varying mediump vec2 impostorSpaceCoordinate varying mediump float normalizedDepth varying mediump float adjustedSphereRadius varying mediump..