Draw shapes stress test
This is a shape drawing stress test for o3d.
Enter in the number of shapes to create and click the appropriate shape type button to render the shapes.
Render
Client Object Count:
0
FPS:
0
// This is the color of the triangle. // We bind this to a javascript variable shapeColorParam // to modify its value dynamically float4 shapeColor : FLOAT4; // input parameters for our vertex shader struct a2v { float4 pos : POSITION; }; // input parameters for our pixel shader struct v2f { float4 pos : POSITION; }; /** * Our vertex shader does nothing but returns the position of the vertex. * (which is unused eventually) */ v2f vsMain(a2v IN) { v2f OUT; OUT.pos = IN.pos; return OUT; } /* Our pixel shader returns the color which is assigned dynamically. */ float4 psMain(v2f IN): COLOR { return shapeColor; } // Here we tell our effect file *which* functions are // our vertex and pixel shaders. // #o3d VertexShaderEntryPoint vsMain // #o3d PixelShaderEntryPoint psMain // #o3d MatrixLoadOrder RowMajor