CapsAdmin

Untitled

Sep 30th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1. render.gbuffer = render.CreateFrameBuffer(
  2.         render.w,
  3.         render.h,
  4.         {
  5.             {
  6.                 name = "diffuse",
  7.                 attach = e.GL_COLOR_ATTACHMENT0,
  8.                 texture_format = {
  9.                     internal_format = e.GL_RGBA32F,
  10.                     format_type = e.GL_FLOAT,
  11.                 }
  12.             },
  13.             {
  14.                 name = "position",
  15.                 attach = e.GL_COLOR_ATTACHMENT1,
  16.                 texture_format = {
  17.                     internal_format = e.GL_RGB32F,
  18.                     format_type = e.GL_FLOAT,
  19.                 }
  20.             },
  21.             {
  22.                 name = "normal",
  23.                 attach = e.GL_COLOR_ATTACHMENT2,
  24.                 texture_format = {
  25.                     internal_format = e.GL_RGB16F,
  26.                     format_type = e.GL_FLOAT,
  27.                 }
  28.             },
  29.             {
  30.                 name = "light",
  31.                 attach = e.GL_COLOR_ATTACHMENT3,
  32.                 texture_format = {
  33.                     internal_format = e.GL_RGBA32F,
  34.                     format_type = e.GL_FLOAT,
  35.                 }
  36.             },
  37.             {
  38.                 name = "depth",
  39.                 attach = e.GL_DEPTH_ATTACHMENT,
  40.                 texture_format = {
  41.                     internal_format = e.GL_DEPTH_COMPONENT24,
  42.                     format_type = e.GL_FLOAT,
  43.                    
  44.                     compare_mode = e.GL_COMPARE_R_TO_TEXTURE,
  45.                     compare_func = e.GL_EQUAL,                   
  46.                     [e.GL_DEPTH_TEXTURE_MODE] = e.GL_INTENSITY,
  47.                    
  48.                 }
  49.             }
  50.         }
  51.     )
Advertisement
Add Comment
Please, Sign In to add comment