New option to send canvas to render buffer

allows to use 3D environment effects for post processing such as Glow,
Bloom, HDR, etc. in 2D.
This commit is contained in:
Juan Linietsky
2015-03-16 00:47:37 -03:00
parent 5b54361daf
commit 53e1694e1e
22 changed files with 238 additions and 50 deletions

View File

@ -0,0 +1,26 @@
extends Node2D
# member variables here, example:
# var a=2
# var b="textvar"
const CAVE_LIMIT=1000
func _input(ev):
if (ev.type==InputEvent.MOUSE_MOTION and ev.button_mask&1):
var rel_x = ev.relative_x
var cavepos = get_node("cave").get_pos()
cavepos.x+=rel_x
if (cavepos.x<-CAVE_LIMIT):
cavepos.x=-CAVE_LIMIT
elif (cavepos.x>0):
cavepos.x=0
get_node("cave").set_pos(cavepos)
func _ready():
set_process_input(true)
# Initialization here
pass

BIN
demos/2d/hdr/beach_cave.scn Normal file

Binary file not shown.

13
demos/2d/hdr/engine.cfg Normal file
View File

@ -0,0 +1,13 @@
[application]
name="HDR for 2D"
main_scene="res://beach_cave.scn"
[display]
width=1080
height=720
[rasterizer]
blur_buffer_size=128

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 KiB

View File

@ -0,0 +1 @@
tolinear=true

BIN
demos/2d/hdr/ocean_cave.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 KiB

View File

@ -0,0 +1 @@
tolinear=true

Binary file not shown.

File diff suppressed because one or more lines are too long