¡@

Home 

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

iphone Programming Glossary: vec3

Fragment Shader - Average Luminosity

http://stackoverflow.com/questions/12168072/fragment-shader-average-luminosity

a single step. I converted the image to luminance at the very first stage using a dot product of the RGB values with a vec3 of 0.2125 0.7154 0.0721 . This allowed me to just read the red channel for each subsequent reduction stage which really..

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

how to improve things Some sample output uniform sampler2D texture varying mediump vec2 fragTexCoord varying mediump vec3 eyespaceNormal varying highp float blurAmount void main void highp vec2 gaussFilter 7 gaussFilter 0 vec2 3.0 0.015625 gaussFilter..

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

vec2 impostorSpaceCoordinate varying mediump float normalizedDepth varying mediump float adjustedSphereRadius const vec3 stepValues vec3 2.0 1.0 0.0 const float scaleDownFactor 1.0 255.0 void main float distanceFromCenter length impostorSpaceCoordinate.. varying mediump float normalizedDepth varying mediump float 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.. calculatedDepth Inlined color encoding for the depth 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..

OpenGL ES 2.0 / MonoTouch: Texture is colorized red

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

issue has been fixed but it does not solve the issue with the red texture. The vertex shader attribute vec3 position uniform mat4 modelViewMatrix varying mediump vec3 texture void main texture position.xyz gl_Position modelViewMatrix.. the issue with the red texture. The vertex shader attribute vec3 position uniform mat4 modelViewMatrix varying mediump vec3 texture void main texture position.xyz gl_Position modelViewMatrix vec4 position.xyz 1.0 The fragment shader varying mediump.. void main texture position.xyz gl_Position modelViewMatrix vec4 position.xyz 1.0 The fragment shader varying mediump vec3 texture uniform samplerCube cubeMap void main mediump vec3 cube vec3 textureCube cubeMap texture gl_FragColor vec4 cube.xyz..