I have implemented a GLSL noise function created by Stefan Gustavson.
For my texture I am currently using 4 noise calls of essentially the same noise. For example I need blocks of noise values for each row:
noise(vec2(floor(MCposition.y / BrickMortar.y)))
And each square area:
noise(floor(position / BrickMortar))
I can see it being more efficient if I just read from a noise textured generated by the CPU where I only need 4 texture calls. Apart from that is there any other way of using some form of buffer so I can read previously generated noise values from the GLSL noise function?
I tried reading about gl_FragData but not sure how it works.
When you have several draw-buffers, let’s say 4,
gl_FragColor = someColor;
is equal to
gl_FragData[0]=someColor; gl_FragData[1]=someColor;
gl_FragData[2]=someColor; gl_FragData[3]=someColor;
To draw in 4 buffers at once, here’s usually how you enter into a FBO and set-up draw-buffers:
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, myFrameBuffer);