gem "ashton", :git => "git://github.com/spooner/ashton.git"
@my_shader.use do
@tiles.each {|t| t.draw x, y, z }
end
@tiles.each {|t| t.draw x, y, z, shader: @my_shader }
shader.use
flushes the drawing and now shadered tiles cover everything they shouldn't. Is there anything I can do?
@tile_shader.enable 1
@tile_shader.enable 1001
@all_objects_including_tiles.each &:draw # With the tiles drawn at either z=1 or z=1001
@tile_shader.disable 1
@tile_shader.disable 1001
@tile_shader.use 1 do
@background_tiles.each &:draw # where z = 1
end
@background_objects.each &:draw # where z is between 2 and 1000
@tile_shader.use 1001 do
@foreground_tiles.each &:draw # where z = 1001
end
@foreground_objects.each &:draw # where z >= 1002
texture.refresh_cache
p texture.rgba(10, 15)
p texture.red(10, 15)
>ruby init.rb
>Exit code: 0
puts @buffer.rgba(10, 15).inspect
p @buffer.rgba(10, 15)
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill