Skip navigation
Philipp Fischer
Currently Being Moderated

Post-processing pipeline causes error when placing "SceneGrid" object into 3D scene

Oct 16, 2011 9:06 PM

Tags: #error #stage3d #proscenium #postprocessing

Hi,

 

first want to thank you guys for the great work with proscenium and the awesome features.

 

I was going through the examples and found a bug. I tried a combination of the examples "TestLines" and "TestPPEncodeDecodeHDR".

The post processing pipeline somehow manipulates the render sates/vertex program in a way it crashes as soon as it should perform the drawTriangles call for a "SceneGrid" object.

It does not seem to be related to my particular post processing setup - I tried TestPPBloom and TestPPEncodeDecodeHDR from the examples. The post processing pipeline seems to work fine with a 3DS model (Teapot) .

 

  //add grid

  scene.addChild(new SceneGrid());

 

  //setup post-processing

  if(true) {

instance.createPostProcessingColorBuffer();

instance.colorBuffer.targetSettings.useHDRMapping = true;

instance.colorBuffer.targetSettings.kHDRMapping = 4;

 

var colorToPrimary:RenderGraphNode = new RenderGraphNodePPElement(instance.colorBuffer, null, RenderGraphNodePPElement.HDR_DECODE, "Decode HDR" );

colorToPrimary.addStaticPrerequisite(instance.colorBuffer.renderGraphN ode);

 

instance.renderGraphRoot.clearAllPrerequisite( );

instance.renderGraphRoot.addStaticPrerequisite(colorToPrimary);

   }

 

This gives me the following error:

 

Error: Error #3607: Stream 2 is set but not used by the current vertex program.

          at flash.display3D::Context3D/drawTriangles()

          at com.adobe.scenegraph::Instance3D/drawTriangles()[D:\Depots\Proscenium \branches\rel\code\Proscenium\src\com\adobe\scenegraph\Instance3D.as:5 37]

          at com.adobe.scenegraph::PB3DCompute/compute()[D:\Depots\Proscenium\bran ches\rel\code\Proscenium\src\com\adobe\scenegraph\PB3DCompute.as:332]

          at com.adobe.scenegraph::RenderGraphNodePPElement/render()[D:\Depots\Pro scenium\branches\rel\code\Proscenium\src\com\adobe\scenegraph\RenderGr aphNodePPElement.as:272]

          at com.adobe.scenegraph::Instance3D/render()[D:\Depots\Proscenium\branch es\rel\code\Proscenium\src\com\adobe\scenegraph\Instance3D.as:304]

          at com.adobe.scenegraph::BasicScene/enterFrameEventHandler()[D:\Depots\P roscenium\branches\rel\code\Proscenium\src\com\adobe\scenegraph\BasicS cene.as:273]

 

 

 

Thanks,

Philipp

 

 

----

Full Source Code:

 

 

package

{

          import com.adobe.scenegraph.*;

          import com.adobe.scenegraph.loaders.*;

          import com.adobe.scenegraph.loaders.collada.*;

          import com.adobe.scenegraph.loaders.obj.*;

 

          import flash.display.*;

          import flash.display3D.*;

          import flash.events.*;

          import flash.geom.*;

          import flash.utils.*;

 

          public class TestLinesWithPostProcessing extends BasicScene

          {

 

  // --------------------------------------------------------------------- -

  override protected function initModels():void

                    {

 

  //add grid

                              scene.addChild(new SceneGrid());

 

  //add teapot

//                              var f:Function = function(event:Event):void { (event.target as ModelLoader).model.addTo(scene); }

//                              var loader:OBJLoader = new OBJLoader("res/content/teapot.obj");

//                              loader.addEventListener(Event.COMPLETE, f, false, 0, true);

 

  //setup post-processing

                              if(true) {

                                        instance.createPostProcessingColorBuffer();

                                        instance.colorBuffer.targetSettings.useHDRMapping = true;

                                        instance.colorBuffer.targetSettings.kHDRMapping = 4;

 

                                        var colorToPrimary:RenderGraphNode = new RenderGraphNodePPElement(instance.colorBuffer, null, RenderGraphNodePPElement.HDR_DECODE, "Decode HDR" );

                                        colorToPrimary.addStaticPrerequisite(instance.colorBuffer.renderGraph Node);

 

                                        instance.renderGraphRoot.clearAllPrerequisite( );

                                        instance.renderGraphRoot.addStaticPrerequisite(colorToPrimary);

                              }

                    }

 

  override protected function resetCamera():void

                    {

                              scene.activeCamera.identity();

                              scene.activeCamera.lookat(new Vector3D(0, 5, -15), new Vector3D(0, 0, 0), new Vector3D(0, 1, 0));

                    }

          }

}

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points