Hi, i am implementing deferred lighting in away3d, and i want to draw a screen quad but not using filter. I made a test in DefaultRenderer like that:
protected override function executeRender(entityCollector : EntityCollector, target : TextureBase = null, scissorRect : Rectangle = null, surfaceSelector : int = 0) : void
{
updateLights(entityCollector);
// otherwise RTT will interfere with other RTTs
if (target) {
drawRenderables(entityCollector.opaqueRenderableHead, entityCollector, RTT_PASSES);
drawRenderables(entityCollector.blendedRenderableHead, entityCollector, RTT_PASSES);
}
super.executeRender(entityCollector, target, scissorRect, surfaceSelector);
// test for draw a full screen quad
////////////////////////////////////////////////////////////////
var _rttManager : RTTBufferManager = RTTBufferManager.getInstance(_stage3DProxy);
var vertexBuffer : VertexBuffer3D = _rttManager.renderToScreenVertexBuffer;
var indexBuffer : IndexBuffer3D = _rttManager.indexBuffer;
_context.setVertexBufferAt(0, vertexBuffer, 0, Context3DVertexBufferFormat.FLOAT_2);
_context.setVertexBufferAt(1, vertexBuffer, 2, Context3DVertexBufferFormat.FLOAT_2);
_context.setDepthTest(false, Context3DCompareMode.ALWAYS);
_context.clear(0.0, 0.2, 0.0, 1.0);
if(!_program)
{
var vCode : String = "mov op, va0\n"+
"mov v0, va1\n";
var fCode : String = "mov ft0, v0\n"+
"mov oc, ft0\n";
_program = _context.createProgram();
_program.upload( new AGALMiniAssembler(Debug.active).assemble(Context3DProgramType.VERTEX, vCode),//, Debug.active),
new AGALMiniAssembler(Debug.active).assemble(Context3DProgramType.FRAGMENT, fCode));//, Debug.active));
}
_context.setProgram(_program);
_context.drawTriangles(indexBuffer, 0, 2);
////////////////////////////////////////////////////////////////
}
but i get nothing, does anyone know how to draw a sceen quad.