سؤال

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 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 :)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top