Im currently playing around with some terrain-generation stuff using OpenGL ES 2.0 on iOS devices. I have a texture and a heightmap. What I want to do is blur the terrain’s texture using a fragment shader, but not on every draw call (just on demand and at the beginning). This is why I decided to process the blurring offscreen inside a FBO and then attach this FBO as a texture to the terrain. Now I’m wondering if it is possible to just add the image(texture) as a color attachement to a newly generated FBO and process it with a fragment shader? Or is there a better approach? No projection, lightning etc. is needed.
Im currently playing around with some terrain-generation stuff using OpenGL ES 2.0 on iOS
Share
You can’t circumvent a vertex shader and have your fragment shader do anything. There are plenty of ways to minimize how much the vertex shader does – you can just pass the geometry right through to the fragment shader. Shaders like that are usually called (unsurprisingly) “pass-through shaders” because they just shuffle information on to the next piece of the pipeline without doing a whole lot.