Render/Compute pass abstraction for creating custom render graphs
Base class for all passes, used to describe a render graph.
GPass()
Default constructor for GPass.
GPass next()
Get the GPass this is connected to.
[ top ]
Render pass for drawing a GScene. If RenderPass.scene() is not set, will default to the main scene, GG.scene() If RenderPass.colorOutput() is not set, will default to the screen. If RenderPass.camera() is not set, will default to the scene's main camera: GG.scene().camera()
RenderPass()
Default constructor for RenderPass.
void colorOutput(Texture color_texture)
Set the target texture to draw the scene to.
Texture colorOutput()
Get the target texture to draw the scene to.
void autoClearColor(int clear)
Set whether the framebuffer's color target should be cleared each frame. Default true.
int autoClearColor()
Get whether the framebuffer's color target is cleared each frame.
[ top ]
Screen pass for applying screen shaders and visual effects to the entire screen.
ScreenPass()
Default constructor for ScreenPass.
ScreenPass(Shader screen_shader)
No description available
void colorOutput(Texture texture)
Set the color attachment output texture of this screen pass.
void shader(Shader shader)
Set the screen shader to apply to the screen. In your screen shader be sure to #include SCREEN_PASS_VERTEX_SHADER which supplies your fragment shader with a full-screen quad.
[ top ]
No description available
OutputPass()
Default constructor for OutputPass.
void input(Texture input_texture)
Set the input texture to apply tonemapping and gamma correction to.
void tonemap(int tonemap_type)
Set the tonemapping algorithm to apply to the input texture. Choose a value from the OutputPass.ToneMap_* enum.
int tonemap()
Get the tonemapping algorithm applied to the input texture.
void exposure(float exposure)
Set the exposure value for the tonemapping algorithm.
float exposure()
Get the exposure value for the tonemapping algorithm.
int ToneMap_None
No description available
int ToneMap_Linear
No description available
int ToneMap_Reinhard
No description available
int ToneMap_Cineon
No description available
int ToneMap_ACES
No description available
int ToneMap_Uncharted
No description available
[ top ]
Compute pass for running compute shaders. Note that unlike Materials, all Compute Pass bindings must be bound under @group(0), NOT @group(1)
ComputePass()
Default constructor for ComputePass.
void uniformInt(int location, int uniform_value)
No description available
void storageBuffer(int location, StorageBuffer buffer)
No description available
void texture(int location, Texture texture)
No description available
void storageTexture(int location, Texture texture)
No description available
void shader(Shader shader)
Set the compute shader to run.
void uniformFloat(int location, float uniform_value)
No description available
void uniformFloat2(int location, vec2 uniform_value)
No description available
void uniformFloat3(int location, vec3 uniform_value)
No description available
void uniformFloat4(int location, vec4 uniform_value)
No description available
void workgroup(int x, int y, int z)
Set the workgroup size for the compute shader. Used to determine the dimensions of the compute pass dispatch.
[ top ]
No description available
BloomPass()
Default constructor for BloomPass.
Texture colorOutput()
Get the render texture that the bloom pass writes to.
void input(Texture bloom_texture)
Set the render texture to apply bloom to.
void radius(float blend_factor)
Set the blend factor between mip levels of the bloom texture during upsample.
void intensity(float blend_factor)
Set the blend factor between the bloom texture and the original image.
float radius()
Get the blend factor between mip levels of the bloom texture.
float intensity()
Get the blend factor between the bloom texture and the original image.
void levels(int num_levels)
Number of blur passes to apply to the bloom texture. Clamped between 0 and 16.
int levels()
Get the number of blur passes applied to the bloom texture.
void threshold(float threshold)
Set the threshold for the bloom pass (colors with all rgb values below threshold are not bloomed)
float threshold()
Get the threshold for the bloom pass.
[ top ]