Created
January 19, 2017 06:38
-
-
Save kovrov/11879c65a35dcd52a07d5625b802e3e8 to your computer and use it in GitHub Desktop.
Render passes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pass_1: { | |
uniforms: { | |
view: camera.view | |
projection: camera.projection | |
} | |
id_tex: { | |
format: GL_R8UI | |
size: {width, height} | |
} | |
depth_tex: { | |
format: GL_DEPTH_COMPONENT24 | |
size: {width, height} | |
} | |
target: { | |
attachments: [ | |
{ | |
texture: id_tex | |
attachment: GL_COLOR_ATTACHMENT0 | |
drawbuffer: GL_COLOR_ATTACHMENT0 | |
} | |
{ | |
texture: depth_tex | |
attachment: GL_DEPTH_ATTACHMENT | |
drawbuffer: GL_NONE | |
} | |
] | |
} | |
shader: { | |
vertex: "stencil.vert" | |
fragment: "stencil.frag" | |
} | |
} | |
pass_2: { | |
uniforms: { | |
view: camera.view | |
projection: camera.projection | |
id_map: pass_1.id_tex | |
depth_map: pass_1.depth_tex | |
} | |
target: default | |
shader: { | |
vertex: "solid.vert" | |
fragment: "solid.frag" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment