-
Notifications
You must be signed in to change notification settings - Fork 18
Uniforms_Widgets_Buffer
Aiekick edited this page Mar 19, 2019
·
1 revision
Buffer Uniform are the way for have multiPass feature :
- you can load another shader file result attachment in a sampler2D
- you can load another attachment of the current buffer
ex : access to the current fbo, id of the attachment(0 to 7) = > fragColor, fragColor1 to fragColor7, but you can name that like you want. all is defiend in glsl
- uniform sampler2D(buffer:target=0-7) name;
same but access to the fbo of another shader, filename must be without extention work only if a shader have a fbo attached;
- uniform sampler2D(buffer:target=id:file=filename) name;
same logic for these two, but get buffer size");
- uniform vec2(buffer:target=id) name;");
- uniform vec2(buffer:target=id:file=filename) name;
you have option like wraping, filtering, mipmap, filp on sampler2D :
- uniform sampler2d(buffer:target=id:file=filename:flip=true:mipmap=true:wrap=clamp:filter=linear) name;
if you define nothign, the defualt is like this :
- uniform sampler2d(buffer:target=id:file=filename:flip=false:mipmap=true:wrap=clamp:filter=linear) name;
pay attention to never use the name buffer ofr an uniform, its a reserved name, and the resulting erros are weird and not related to that name, so difficult to know what is rely :)