开发者

How to create a high-resolution offscreen fragment shader?

I figured out my fragment shader is limited to the pixel dimensions of the OpenGL ES viewport.

Could I create an "offscreen fragment shader" or rendering environment which has 开发者_JAVA百科a lot more pixels for rendering?


Fragment shaders take values created by the rasterization after the vertex shader. What you need to do is to create a Texture (very large texture), bind it to a FBO (you can look at OGL's doc for that, it's not very complicated) and render to it. Before the offscreen render, use the

glViewPort

function to define the rendering width and height. Before this offscreen rendering, use your fragment shader and all will work fine. Good luck :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜