¡@

Home 

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

iphone Programming Glossary: distancefromcenter

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

vec2 textureCoordinateToUse vec2 textureCoordinate2.x textureCoordinate2.y aspectRatio 0.5 0.5 aspectRatio highp float distanceFromCenter distance excludeCirclePoint textureCoordinateToUse gl_FragColor mix sharpImageColor blurredImageColor smoothstep excludeCircleRadius.. gl_FragColor mix sharpImageColor blurredImageColor smoothstep excludeCircleRadius excludeBlurSize excludeCircleRadius distanceFromCenter This fragment shader takes in a pixel color value from both the original sharp image and a Gaussian blurred version of the.. aspectRatio 0.5 0.5 aspectRatio textureCoordinateToUse abs excludeCirclePoint textureCoordinateToUse highp float distanceFromCenter max textureCoordinateToUse.x textureCoordinateToUse.y gl_FragColor mix sharpImageColor blurredImageColor smoothstep excludeCircleRadius..

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

adjustedSphereRadius const vec3 stepValues vec3 2.0 1.0 0.0 const float 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.. 2.0 1.0 0.0 const float 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.. length impostorSpaceCoordinate if distanceFromCenter 1.0 gl_FragColor vec4 1.0 else float calculatedDepth sqrt 1.0 distanceFromCenter distanceFromCenter mediump float currentDepthValue normalizedDepth adjustedSphereRadius calculatedDepth Inlined color encoding..