//     
//          Blitz3D

// gc (garbage collector -  )        .

var	texture1
var	x
var	y
var	t

function apply_shader	entity

	//texture1=LoadTexture("Samples media\underwaterlight.png", 0)
	invg	load_texture	texture1	"Samples media\energy.png"

	//TextureBlend texture1, 3
	invg	texture_blend	gc	texture1	3
	
	//EntityTexture	entity, texture, 0, 1
	invg	apply_texture	gc	entity	texture1	0	1

end_function

function update_shader

	//x=x+0.01
	add	x	.01	x
	
	//t=t+1
	inc	t
	
	//y=Sin(t)
	invg	sin	y	t
	
	//y=y*0.5
	mul	y	0.5	y
	
	//PositionTexture texture1, x, y
	invg	position_texture	gc	texture1	x	y

end_function