¡@

Home 

2014/10/15 ¤U¤È 10:09:46

iphone Programming Glossary: gl_fragcolor

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

pixelTop texture2D inputTextureTop textureCoordinate lowp vec4 pixelBot texture2D inputTextureBot textureCoordinate gl_FragColor someBlendOperation pixelTop pixelBot iphone ios opengl es opengl es 2.0 textures share improve this question You have.. pixelTop texture2D inputTextureTop textureCoordinate lowp vec4 pixelBot texture2D inputTextureBot textureCoordinate2 gl_FragColor someBlendOperation pixelTop pixelBot BTW inputTextureCoordinate is not necessary to be vec4 but it could be vec2 share..

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

aspectRatio 0.5 0.5 aspectRatio highp float distanceFromCenter distance excludeCirclePoint textureCoordinateToUse gl_FragColor mix sharpImageColor blurredImageColor smoothstep excludeCircleRadius excludeBlurSize excludeCircleRadius distanceFromCenter.. textureCoordinateToUse highp float distanceFromCenter max textureCoordinateToUse.x textureCoordinateToUse.y gl_FragColor mix sharpImageColor blurredImageColor smoothstep excludeCircleRadius excludeBlurSize excludeCircleRadius distanceFromCenter..

OpenGL ES 2.0 fragment shader to blur is slow and low quality

http://stackoverflow.com/questions/4355525/opengl-es-2-0-fragment-shader-to-blur-is-slow-and-low-quality

texture vec2 fragTexCoord.x gaussFilter i .x blurSize fragTexCoord.y gaussFilter i .x blurSize gaussFilter i .y gl_FragColor color Edit A box blur may be the way to go. Here is a box blur version of the shader highp vec4 color vec4 0 0 0 1 color.. fragTexCoord.y 3.0 blurAmount 0.09 color texture2D texture vec2 fragTexCoord.x fragTexCoord.y 4.0 blurAmount 0.05 gl_FragColor color Here is the box blur output note it's only a horizontal blur but it might be enough for what i want iphone ipad ios..

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

sampleDivisor vec2 fractionalWidthOfPixel highp vec2 samplePos textureCoordinate mod textureCoordinate sampleDivisor gl_FragColor texture2D inputImageTexture samplePos In my benchmarks GPU based filters like this perform 6 24X faster than equivalent..

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

scaleDownFactor 1.0 255.0 void main float distanceFromCenter length impostorSpaceCoordinate if distanceFromCenter 1.0 gl_FragColor vec4 1.0 else float calculatedDepth sqrt 1.0 distanceFromCenter distanceFromCenter mediump float currentDepthValue normalizedDepth.. values float ceiledValue ceil currentDepthValue 765.0 vec3 intDepthValue vec3 ceiledValue scaleDownFactor stepValues gl_FragColor vec4 intDepthValue 1.0 On an iPad 1 this takes 35 68 ms to render a frame of a DNA spacefilling model using a passthrough.. impostorSpaceCoordinate varying mediump float normalizedDepth varying mediump float adjustedSphereRadius void main gl_FragColor vec4 adjustedSphereRadius normalizedDepth impostorSpaceCoordinate 1.0 2.0 normalizedDepth 1.0 it takes 18 35 ms on iPad..

OpenGL ES 2.0 / MonoTouch: Texture is colorized red

http://stackoverflow.com/questions/7986153/opengl-es-2-0-monotouch-texture-is-colorized-red

varying mediump vec3 texture uniform samplerCube cubeMap void main mediump vec3 cube vec3 textureCube cubeMap texture gl_FragColor vec4 cube.xyz 1.0 c# iphone ios opengl es monotouch share improve this question The problem is your function CreateARGBBitmapContext..

GLSL: Built-in attributes not accessible for iPhone Apps?

http://stackoverflow.com/questions/8205501/glsl-built-in-attributes-not-accessible-for-iphone-apps

all the available built in special variables as gl_Position gl_PointSize gl_FragCoord gl_FrontFacing gl_PointCoord gl_FragColor gl_FragData n GLKit's maths stuff is really good because it inlines and uses the ARM's NEON SIMD unit. I consider it a sufficient..

Overlay Color Blend in OpenGL ES / iOS / Cocos2d

http://stackoverflow.com/questions/8771413/overlay-color-blend-in-opengl-es-ios-cocos2d

The Overlay actually multiply effect corresponds to the GL_MODULATE texture environment mode. Or in terms of a shader gl_FragColor texture2D ... color . Lighten is min texture2D ... color Multiply actually overlay is gl_FragColor 1. 1. color texture2D.. terms of a shader gl_FragColor texture2D ... color . Lighten is min texture2D ... color Multiply actually overlay is gl_FragColor 1. 1. color texture2D ... 1. color Soft Light is gl_FragColor 1. 1. texture2D ... 1. color k b k and b choosen parameters..