Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PixelRegion ¶
type PixelRegion struct {
// Tex0, Tex1 and Tex2 are textures available to the shader
// They're available as u_tex0, u_tex1, and u_tex2
// Note: The position for the textures is opposite the frag coordinates
// Due to OpenGL storing the textures flipped on the y-axis.
// so if
// vec2 p = gl_FragCoord.xy/u_resolution.xy;
// the coordinate positions are
// vec2 texPos = vec2(p.x, -p.y);
Tex0, Tex1, Tex2 *common.Texture
}
PixelRegion is a drawable to use with the pixel shader!
func (PixelRegion) Close ¶
func (p PixelRegion) Close()
func (PixelRegion) Height ¶
func (p PixelRegion) Height() float32
func (PixelRegion) Texture ¶
func (p PixelRegion) Texture() *gl.Texture
func (PixelRegion) Width ¶
func (p PixelRegion) Width() float32
type PixelShader ¶
type PixelShader struct { FragShader string // contains filtered or unexported fields }
func (*PixelShader) Draw ¶
func (s *PixelShader) Draw(render *common.RenderComponent, space *common.SpaceComponent)
func (*PixelShader) Post ¶
func (s *PixelShader) Post()
func (*PixelShader) Pre ¶
func (s *PixelShader) Pre()
func (*PixelShader) SetCamera ¶
func (s *PixelShader) SetCamera(c *common.CameraSystem)
Click to show internal directories.
Click to hide internal directories.