Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- render.gbuffer = render.CreateFrameBuffer(
- render.w,
- render.h,
- {
- {
- name = "diffuse",
- attach = e.GL_COLOR_ATTACHMENT0,
- texture_format = {
- internal_format = e.GL_RGBA32F,
- format_type = e.GL_FLOAT,
- }
- },
- {
- name = "position",
- attach = e.GL_COLOR_ATTACHMENT1,
- texture_format = {
- internal_format = e.GL_RGB32F,
- format_type = e.GL_FLOAT,
- }
- },
- {
- name = "normal",
- attach = e.GL_COLOR_ATTACHMENT2,
- texture_format = {
- internal_format = e.GL_RGB16F,
- format_type = e.GL_FLOAT,
- }
- },
- {
- name = "light",
- attach = e.GL_COLOR_ATTACHMENT3,
- texture_format = {
- internal_format = e.GL_RGBA32F,
- format_type = e.GL_FLOAT,
- }
- },
- {
- name = "depth",
- attach = e.GL_DEPTH_ATTACHMENT,
- texture_format = {
- internal_format = e.GL_DEPTH_COMPONENT24,
- format_type = e.GL_FLOAT,
- compare_mode = e.GL_COMPARE_R_TO_TEXTURE,
- compare_func = e.GL_EQUAL,
- [e.GL_DEPTH_TEXTURE_MODE] = e.GL_INTENSITY,
- }
- }
- }
- )
Advertisement
Add Comment
Please, Sign In to add comment